diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-05 16:08:42 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-05 16:08:42 +0000 |
commit | 36ef345eb6425106f061fb866d9fa66d051e16df (patch) | |
tree | 53fb2bd05f8b5e2010f9e3d1e93075ad7071ec1e /actions/admin/user/makeadmin.php | |
parent | 5571ca5b350fd1735f13af7ddfbb88afa6befb0c (diff) | |
download | elgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.gz elgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.bz2 |
Merged 5530:5604 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@5622 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/admin/user/makeadmin.php')
-rw-r--r-- | actions/admin/user/makeadmin.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actions/admin/user/makeadmin.php b/actions/admin/user/makeadmin.php index 580e7df05..dc5c508fb 100644 --- a/actions/admin/user/makeadmin.php +++ b/actions/admin/user/makeadmin.php @@ -15,11 +15,10 @@ admin_gatekeeper(); // Get the user $guid = get_input('guid'); -$obj = get_entity($guid); +$user = get_entity($guid); -if (($obj instanceof ElggUser) && ($obj->canEdit())) { - $obj->admin = 'yes'; - if ($obj->admin) { +if (($user instanceof ElggUser) && ($user->canEdit())) { + if ($user->makeAdmin()) { system_message(elgg_echo('admin:user:makeadmin:yes')); } else { register_error(elgg_echo('admin:user:makeadmin:no')); |