Changeset 8758


Ignore:
Timestamp:
Jan 19, 2011, 12:18:55 PM (14 years ago)
Author:
plg
Message:

bug 2018: now when a user gets an "admin" or "webmaster" status he
automatically gets the "admin" privacy level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/user_list.php

    r8728 r8758  
    430430        {
    431431          $data[$dbfield] = $_POST[$dbfield];
     432        }
     433      }
     434
     435      // if the status is getting greater or equal to "admin", then level
     436      // automatically switches to "admin" (8), unless the level is also
     437      // defined in the same batch action.
     438      if (isset($data['status']) and in_array($data['status'], array('webmaster', 'admin')))
     439      {
     440        if (!isset($data['level']))
     441        {
     442          $data['level'] = 8;
     443          if (!in_array('level', $dbfields['update']))
     444          {
     445            array_push($dbfields['update'], 'level');
     446          }
    432447        }
    433448      }
Note: See TracChangeset for help on using the changeset viewer.