END_OF_REGISTERUSER_HELP;
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR.'/scripts/commandline.inc.php';
$nickname = get_option_value('n', 'nickname');
$password = get_option_value('w', 'password');
$user->email = $email;
- if (!$user->updateKeys($orig)) {
- print "Failed!\n";
- throw new Exception("Can't update email address.");
- }
+ // Throws exception on failure.
+ $user->updateWithKeys($orig);
}
} catch (Exception $e) {