mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
Fix: superadmin is downgrade after update
This commit is contained in:
@@ -1137,8 +1137,6 @@ class User extends CommonObject
|
||||
$adh->user_id=$this->id;
|
||||
$adh->user_login=$this->login;
|
||||
|
||||
//$adh->entity=$this->entity;
|
||||
|
||||
$result=$adh->update($user,0,1);
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
@@ -1584,7 +1584,8 @@ else
|
||||
{
|
||||
$yn = yn($fuser->admin);
|
||||
print '<input type="hidden" name="admin" value="'.$fuser->admin.'">';
|
||||
if (! empty($conf->multicompany->enabled) && ! $fuser->entity) print $form->textwithpicto($yn,$langs->trans("DontDowngradeSuperAdmin"),1,'warning');
|
||||
print '<input type="hidden" name="superadmin" value="'.(empty($fuser->entity) ? 1 : 0).'">';
|
||||
if (! empty($conf->multicompany->enabled) && empty($fuser->entity)) print $form->textwithpicto($yn,$langs->trans("DontDowngradeSuperAdmin"),1,'warning');
|
||||
else print $yn;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
Reference in New Issue
Block a user