set default $role='3' in addUser()

This commit is contained in:
Uwe Steinmann 2021-09-28 15:44:12 +02:00
parent d05a200ed6
commit b6a308e630

View File

@ -2846,7 +2846,7 @@ class SeedDMS_Core_DMS {
* @param null $homefolder
* @return bool|SeedDMS_Core_User
*/
function addUser($login, $pwd, $fullName, $email, $language, $theme, $comment, $role='0', $isHidden=0, $isDisabled=0, $pwdexpiration='', $quota=0, $homefolder=null) { /* {{{ */
function addUser($login, $pwd, $fullName, $email, $language, $theme, $comment, $role='3', $isHidden=0, $isDisabled=0, $pwdexpiration='', $quota=0, $homefolder=null) { /* {{{ */
$db = $this->db;
if (is_object($this->getUserByLogin($login))) {
return false;
@ -2854,7 +2854,7 @@ class SeedDMS_Core_DMS {
if(is_object($role))
$role = $role->getID();
elseif($role == '')
$role = '0';
$role = '3';
if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') {
$pwdexpiration = 'NULL';
} elseif(trim($pwdexpiration) == 'now') {