$user->upload_avatar(); if ($access == 5) { $access = T_('Guest'); } elseif ($access == 25) { $access = T_('User'); } elseif ($access == 100) { $access = T_('Admin'); } /* HINT: %1 Username, %2 Access num */ show_confirmation(T_('New User Added'), sprintf(T_('%1$s has been created with an access level of %2$s'), $username, $access), AmpConfig::get('web_path') . '/admin/users.php'); break; case 'enable': $client = new User($_REQUEST['user_id']); $client->enable(); if (!AmpConfig::get('user_no_email_confirm')) { Registration::send_account_enabled($client->username, $client->fullname, $client->email); } show_confirmation(T_('User Enabled'), $client->fullname . ' (' . $client->username . ')', AmpConfig::get('web_path') . '/admin/users.php'); break; case 'disable': $client = new User($_REQUEST['user_id']); if ($client->disable()) { show_confirmation(T_('User Disabled'), $client->fullname . ' (' . $client->username . ')', AmpConfig::get('web_path') . '/admin/users.php'); } else { show_confirmation(T_('Error'), T_('Unable to Disabled last Administrator'), AmpConfig::get('web_path') . '/admin/users.php'); } break; case 'show_edit': if (AmpConfig::get('demo_mode')) { break; }