- attached settings.tpl
Password change on webui
May I kindly ask for password change option in webui. I think it would be great if the user can change his or her password.
Comments (27)
-
repo owner -
repo owner just set $config['PASSWORD_CHANGE_ENABLED'] = 1; in config-site.php and it makes the password changing form visible.
However it looked weird on the devel site, so you may want to try replacing view/theme/default/templates/user/settings.tpl with the attached file.
-
reporter Thank you for the clarification. I found it and changed in the config.php. You can close the issue.
-
repo owner - changed status to resolved
-
reporter - changed status to open
Ok, now I have the option, but I've tried to change password, but I've got a Page not found message. Should I change any other thing in the config?
-
repo owner The config is fine. There's a typo in view/theme/default/templates/user/settings.tpl Please replace: "index.php?route=common/home" with "settings.php"
I'll commit the fix to the master branch soon.
-
reporter It works, thx.
-
repo owner - changed status to resolved
-
Hi, I failed to change password for auditor@local in setting
I getting bellow error
"Failed to change password."
-
repo owner What version? Is there an error message in any of the logs? Any clue why it failed?
-
I have installed this in Debian Jessie 8.8. piler 1.2.0 sphinx search 2.3.2-beta-1~jessie amd64
I do not see any of log update when i change password
-
Please ignore my query it's woking now.
-
repo owner OK :-)
-
I'm having a similar problem - I don't see any errors in the log, but when I enable $config['PASSWORD_CHANGE_ENABLED'] = 1, and then attempt to change the password, it fails with "Failed to change password." I read this thread, and changed the "index.php?route=common/home" to "settings.php", but it still fails.
I'm running 1.3.1 build 956 on an updated OVA install - Linux mailarchive 3.2.0-4-amd64
#1SMP Debian 3.2.96-2 x86_64 GNU/LinuxThanks!
-
repo owner Check if the nginx config has settings.php. Also check if nginx reports any error.
-
I neglected to add that I'm using Apache - sorry about that. Nevertheless, Apache does not report any error - I see in the logs where the change is sent in a POST request to settings.php, but there is no error recorded, and the UI still responds "Failed to change password."
-
I'm still having this issue - I get no errors, and the UI simply is responding that the password change failed. The password change is indeed failing as well. Any other thoughts?
-
repo owner Check if view/theme/default/templates/user/settings.tpl has the following at the bottom:
<form name="pwdchange" action="settings.php" method="post" autocomplete="off">
Then I'd like to see what's going on after you click on the submit button, eg. apache/php error logs, whatever is relevant.
-
The view/theme/default/templates/user/settings.tpl file does have that form information at the bottom - seems to be correct.
After you click submit, I see the POST in the piler-access.log file: "POST /settings.php HTTP/1.1" 200 2812
But there is nothing recorded any of the error.log files at that time that I can find.
Is there some configuration that I should check in Apache for that settings.php to function?
-
repo owner Not really. I assume you have a local user you want to change password for.
-
Yes - I want the local user to be able to change their own password for security reasons. I can change it in the Admin area, but the user cannot change it on their page.
-
repo owner OK, then try the following: get the latest master branch, and copy the webui directory to /var/piler/www2 or similar place. Configure your website to access it with a different url (not affecting current users). Copy your current config-site.php to /var/piler/www2 directory. Then edit config.php, and locate the line referencing to config-site.php, and fix it. Then I'd like you to try the password change using the latest gui.
-
Ok - I temporarily used the master branch and replaced my /var/piler/www directory with the contents of webui, and now I get the following error from any page in the ui:
Error: SQLSTATE[42000] [1115] Unknown character set: 'DB_CHARSET' on database: piler
-
repo owner Copy config.php.in from the root dir of the piler source to /var/piler/www (and then fix the reference to config-site.php). Anyway config.php should have the following:
define('DB_CHARSET', 'utf8mb4');
-
Ok, that update of config.php fixed the SQL error, but the password change still gives an error of "Failed to change password."
-
repo owner My bad. Edit model/user/auth.php, and locate the following line:
public function change_password($username = '', $password = '') {
It has this line inside the function:
$query = $this->db->query("UPDATE " . TABLE_USER . " SET password=? WHERE username=?", array(crypt($password), $username));
Now, replace it with this one, and you'll be fine:
$query = $this->db->query("UPDATE " . TABLE_USER . " SET password=? WHERE uid=(SELECT uid FROM " . TABLE_EMAIL . " WHERE email=?)", array(crypt($password), $username));
If it works, then you may revert to the 1.3.1 gui, and apply this fix there as well.
-
That fixed it! Thank you! Password changes work now - and in 1.3.1 as well, with the change applied. Thanks!
- Log in to comment