1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 10:23:53 +02:00

Allow importing of avatars via Media-Manager. Allow editing of admin perms=0 in admin users.

This commit is contained in:
Cameron
2016-03-14 13:03:55 -07:00
parent 3c089d83a7
commit 21535133f2
2 changed files with 30 additions and 6 deletions

View File

@@ -2319,9 +2319,12 @@ class users_admin_form_ui extends e_admin_form_ui
function user_perms($curval,$mode)
{
if($mode == 'read')
$perms = $this->getController()->getModel()->get('user_perms');
$uid = $this->getController()->getModel()->get('user_id');
if($mode == 'read' || (str_replace(".","",$perms) == '0' && $uid == USERID))
{
$uid = $this->getController()->getModel()->get('user_id');
return e107::getUserPerms()->renderPerms($curval,$uid);
}
if($mode == 'write')
@@ -2494,13 +2497,15 @@ class users_admin_form_ui extends e_admin_form_ui
$opts = array();
$opts['usersettings'] = LAN_EDIT;
if ($row['user_perms'] != "0")
{
// disabled user info <option value='userinfo'>".USRLAN_80."</option>
// $text .= "<option value='usersettings'>".LAN_EDIT."</option>";
$opts['usersettings'] = LAN_EDIT;
// login/logout As
if(getperms('0') && !($row['user_admin'] && getperms('0', $row['user_perms'])))