mirror of
https://github.com/flarum/framework.git
synced 2024-12-04 00:03:37 +08:00
Allow existing user to be activated via API
This commit is contained in:
parent
d83a0ee380
commit
61a29648b4
|
@ -83,6 +83,10 @@ class EditUserHandler
|
|||
}
|
||||
}
|
||||
|
||||
if ($actor->isAdmin() && ! empty($attributes['isActivated'])) {
|
||||
$user->activate();
|
||||
}
|
||||
|
||||
if (isset($attributes['password'])) {
|
||||
$this->assertPermission($canEdit);
|
||||
$user->changePassword($attributes['password']);
|
||||
|
|
Loading…
Reference in New Issue
Block a user