PasswordsettingsAction aligned with FormAction
Also made some changes in the password "munging" function call common_munge_password to accept a profile instead of user ID (which was only there because stoneage StatusNet used the ID to generate a not-very-random salt, but nowadays we primarily use AuthCrypt plugin).
This commit is contained in:
@@ -210,7 +210,7 @@ function common_language()
|
||||
/**
|
||||
* Salted, hashed passwords are stored in the DB.
|
||||
*/
|
||||
function common_munge_password($password, $id, Profile $profile=null)
|
||||
function common_munge_password($password, Profile $profile=null)
|
||||
{
|
||||
$hashed = null;
|
||||
|
||||
@@ -245,8 +245,7 @@ function common_check_user($nickname, $password)
|
||||
}
|
||||
|
||||
if ($user instanceof User && !empty($password)) {
|
||||
if (0 == strcmp(common_munge_password($password, $user->id),
|
||||
$user->password)) {
|
||||
if (0 == strcmp(common_munge_password($password, $user->getProfile()), $user->password)) {
|
||||
//internal checking passed
|
||||
$authenticatedUser = $user;
|
||||
}
|
||||
|
Reference in New Issue
Block a user