forked from GNUsocial/gnu-social
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user