Commit 6d31c149 authored by Leigh Stoller's avatar Leigh Stoller

Do not allow setting admin mode for inactive users.

parent af4bf0fb
......@@ -136,6 +136,9 @@ elseif ($type == "adminflag") {
if (! ($target_user = User::Lookup($user))) {
PAGEARGERROR("Target user '$user' is not a valid user!");
}
if ($value && $target_user->status() != TBDB_USERSTATUS_ACTIVE) {
PAGEARGERROR("Target user '$user' has not been activated yet!");
}
$zapurl = CreateURL("showuser", $target_user);
$target_user->SetAdminFlag($value);
$target_uid = $target_user->uid();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment