mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
hash password when creating a new user
This commit is contained in:
parent
84443437a2
commit
6250a212b3
|
@ -2056,7 +2056,7 @@ class RestapiController { /* {{{ */
|
|||
$role = isset($params['role']) ? $params['role'] : null;
|
||||
$roleid = $role == 'admin' ? SeedDMS_Core_User::role_admin : ($role == 'guest' ? SeedDMS_Core_User::role_guest : SeedDMS_Core_User::role_user);
|
||||
|
||||
$newAccount = $dms->addUser($userName, $password, $fullname, $email, $language, $theme, $comment, $roleid);
|
||||
$newAccount = $dms->addUser($userName, seed_pass_hash($password), $fullname, $email, $language, $theme, $comment, $roleid);
|
||||
if ($newAccount === false) {
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Account could not be created, maybe it already exists', 'data'=>''), 500);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user