Super Admin edit page points to billing now
* Also prevent super admin from being deleted
This commit is contained in:
parent
29e9182fcd
commit
faa12c8065
6 changed files with 32 additions and 9 deletions
|
@ -63,7 +63,9 @@ class UserController extends Zend_Controller_Action
|
|||
$user->setPassword($formData['password']);
|
||||
}
|
||||
if (array_key_exists('type', $formData)) {
|
||||
$user->setType($formData['type']);
|
||||
if ($formData['type'] != UTYPE_SUPERADMIN) { //Don't allow any other user to be promoted to Super Admin
|
||||
$user->setType($formData['type']);
|
||||
}
|
||||
}
|
||||
$user->setEmail($formData['email']);
|
||||
$user->setCellPhone($formData['cell_phone']);
|
||||
|
@ -189,6 +191,12 @@ class UserController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
$user = new Application_Model_User($delId);
|
||||
|
||||
// Don't allow super admins to be deleted.
|
||||
if ($user->isSuperAdmin())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
# Take care of the user's files by either assigning them to somebody
|
||||
# or deleting them all
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue