if ($password=='' and !empty($_POST['password'])) $password = $_POST['password'];
if ($this->db->is_html) echo <<<EOF
<form action="$this->uri" method="post">
-<label>Password: </label><input type="text" name="password" value="$password" />
+<label>Password</label><input type="text" name="password" value="$password" />
<input type="submit" />
</form>
EOF;
+ if (!$password) return [];
$salt = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',4)),0,4);
$password = '{SSHA}' . base64_encode(sha1( $password.$salt, TRUE ). $salt);
return [ 'SSHA' => $password ];