Dotclear


Ignore:
Timestamp:
05/24/11 13:56:04 (13 years ago)
Author:
Dsls <dsls@…>
Branch:
default
Message:

superadmin now cannot delete themselves, nor remove their superadmin right.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/user.php

    r270 r313  
    9696          $cur->user_post_status = $user_post_status = $_POST['user_post_status']; 
    9797           
     98          if ($cur->user_id == $core->auth->userID() && $core->auth->isSuperAdmin()) { 
     99               // force super_user to true if current user 
     100               $cur->user_super = $user_super = true; 
     101          } 
    98102          if ($core->auth->allowPassChange()) { 
    99103               $cur->user_change_pwd = !empty($_POST['user_change_pwd']) ? 1 : 0; 
     
    255259} 
    256260 
     261$super_disabled = $user_super && $user_id == $core->auth->userID(); 
     262 
    257263echo 
    258 '<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'',16).' '. 
     264'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'',16,$super_disabled).' '. 
    259265__('Super administrator').'</label></p>'. 
    260266'</div>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map