36 if ($role) $role->Delete();
40 return _(
"role cannot be revived");
50 if ($wu->isAffected()) {
51 return $wu->getMail($rawmail);
55 private function lowerLogin()
90 $sR->password_new = uniqid(
"role");
95 $this->
setValue(
"us_whatid", $sR->id);
106 $err = $sR->modify();
121 if ($wuser && $wuser->isAffected()) {
122 $this->SetValue(
"us_whatid", $wuser->id);
123 $this->SetValue(
"role_login", $wuser->login);
124 $this->SetValue(
"role_name", $wuser->lastname);
125 $this->
modify(
true,
"",
true);
137 unset($this->sysRole);
138 $this->sysRole = null;
140 if (empty($this->sysRole)) {
143 $this->sysRole = new \Account(
"",
$wid);
146 if (!$this->sysRole)
return null;
157 $sql = sprintf(
"select id from users where login = '%s' and id != %d", mb_strtolower(pg_escape_string(
$login)) , $this->
getRawValue(
"us_whatid"));
160 if (
$id)
$err = sprintf(_(
"role %s id is already used") ,
$login);
modify($nopost=false, $sfields="", $nopre=false)
setValue($attrid, $value, $index=-1, &$kvalue=null)
getAccount($nocache=false)
simpleQuery($dbaccess, $query, &$result=array(), $singlecolumn=false, $singleresult=false, $useStrict=null)
if($file) if($subject==""&&$file) if($subject=="") $err
getRawValue($idAttr, $def="")