From 58ebe269fe68620201c8b05107e9a6d6d5319746 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 31 May 2009 12:13:08 +0000 Subject: [PATCH] MDL-15249 password reset cli script improvements --- admin/cli/reset_password.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/cli/reset_password.php b/admin/cli/reset_password.php index 749ef4de25..c4a2fe4db1 100644 --- a/admin/cli/reset_password.php +++ b/admin/cli/reset_password.php @@ -56,12 +56,13 @@ Options: -h, --help Print out this help Example: \$sudo -u wwwrun /usr/bin/php admin/cli/reset_password.php -"; //TODO: localize +"; //TODO: localize, mark as needed in install - to be translated later when everything is finished echo $help; die; } -$prompt = "Password reset - enter username (manual authentication only)"; // TODO: localize +cli_heading('Password reset'); // TODO: localize +$prompt = "enter username (manual authentication only)"; // TODO: localize $username = cli_input($prompt); if (!$user = $DB->get_record('user', array('auth'=>'manual', 'username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) { @@ -80,6 +81,6 @@ $hashedpassword = hash_internal_user_password($password); $DB->set_field('user', 'password', $hashedpassword, array('id'=>$user->id)); -echo "yay!\n"; +echo "Password cahnged\n"; exit(0); // 0 means success \ No newline at end of file -- 2.39.5