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:
Mikael Nordfeldth
2015-07-17 01:47:43 +02:00
parent 47ef917f62
commit cfaaf3c13c
9 changed files with 47 additions and 71 deletions

View File

@@ -299,7 +299,7 @@ class User extends Managed_DataObject
}
if (!empty($password)) { // may not have a password for OpenID users
$user->password = common_munge_password($password, $id);
$user->password = common_munge_password($password);
}
$result = $user->insert();
@@ -1015,6 +1015,11 @@ class User extends Managed_DataObject
return $this->getProfile()->isPrivateStream();
}
public function hasPassword()
{
return !empty($this->password);
}
public function delPref($namespace, $topic)
{
return $this->getProfile()->delPref($namespace, $topic);