Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
6d31c149
Commit
6d31c149
authored
Sep 18, 2013
by
Leigh B Stoller
Browse files
Do not allow setting admin mode for inactive users.
parent
af4bf0fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/toggle.php
View file @
6d31c149
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment