diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-12-16 17:09:59 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-12-16 17:13:19 -0200 |
commit | 24a87e444f427f1bccf6bc1eb2d34fea5be4a623 (patch) | |
tree | e5ca156bf4d6936a0b1bc2a1367a3f7cab7bef8a /usr/local | |
parent | 9279460b87d9c468c0053d4723d409a023475b03 (diff) | |
download | pfsense-24a87e444f427f1bccf6bc1eb2d34fea5be4a623.zip pfsense-24a87e444f427f1bccf6bc1eb2d34fea5be4a623.tar.gz |
Use provided function to change user's password
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/system_usermanager_passwordmg.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/system_usermanager_passwordmg.php b/usr/local/www/system_usermanager_passwordmg.php index 9f069df..c3dba2a 100644 --- a/usr/local/www/system_usermanager_passwordmg.php +++ b/usr/local/www/system_usermanager_passwordmg.php @@ -38,6 +38,7 @@ ##|*MATCH=system_usermanager_passwordmg.php* ##|-PRIV +require_once("auth.inc"); require_once("certs.inc"); require_once("guiconfig.inc"); @@ -58,8 +59,11 @@ if (isset($_POST['save'])) { if (!session_id()) session_start(); // all values are okay --> saving changes - $config['system']['user'][$userindex[$_SESSION['Username']]]['password'] = crypt(trim($_POST['passwordfld1'])); - local_user_set($config['system']['user'][$userindex[$_SESSION['Username']]]); + + $userent =& $config['system']['user'][$userindex[$_SESSION['Username']]]; + local_user_set_password($userent, $_POST['passwordfld1']); + local_user_set($userent); + unset($userent); session_commit(); write_config(); |