mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-10-14 04:51:32 +00:00
set default $role='3' in addUser()
This commit is contained in:
parent
d05a200ed6
commit
b6a308e630
|
@ -2846,7 +2846,7 @@ class SeedDMS_Core_DMS {
|
||||||
* @param null $homefolder
|
* @param null $homefolder
|
||||||
* @return bool|SeedDMS_Core_User
|
* @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;
|
$db = $this->db;
|
||||||
if (is_object($this->getUserByLogin($login))) {
|
if (is_object($this->getUserByLogin($login))) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -2854,7 +2854,7 @@ class SeedDMS_Core_DMS {
|
||||||
if(is_object($role))
|
if(is_object($role))
|
||||||
$role = $role->getID();
|
$role = $role->getID();
|
||||||
elseif($role == '')
|
elseif($role == '')
|
||||||
$role = '0';
|
$role = '3';
|
||||||
if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') {
|
if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') {
|
||||||
$pwdexpiration = 'NULL';
|
$pwdexpiration = 'NULL';
|
||||||
} elseif(trim($pwdexpiration) == 'now') {
|
} elseif(trim($pwdexpiration) == 'now') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user