summaryrefslogtreecommitdiff
path: root/modules/user/controllers/admin_users.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-15 14:37:57 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-16 08:53:31 -0700
commit00eacd659f27df9c13246c510057c4f42c8866a2 (patch)
tree7f6201c54c0d7c1de2eeb337b3331d1864d30fb0 /modules/user/controllers/admin_users.php
parentbe6765336eb894535d62055fab577dfc951b6b6a (diff)
Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module.
Diffstat (limited to 'modules/user/controllers/admin_users.php')
-rw-r--r--modules/user/controllers/admin_users.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index 64f19ecd..3465c4b1 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -65,7 +65,7 @@ class Admin_Users_Controller extends Admin_Controller {
public function delete_user($id) {
access::verify_csrf();
- if ($id == user::active()->id || $id == user::guest()->id) {
+ if ($id == Identity::active()->id || $id == user::guest()->id) {
access::forbidden();
}
@@ -132,7 +132,7 @@ class Admin_Users_Controller extends Admin_Controller {
}
// An admin can change the admin status for any user but themselves
- if ($user->id != user::active()->id) {
+ if ($user->id != Identity::active()->id) {
$user->admin = $form->edit_user->admin->checked;
}
$user->save();
@@ -154,7 +154,7 @@ class Admin_Users_Controller extends Admin_Controller {
$form = $this->_get_user_edit_form_admin($user);
// Don't allow the user to control their own admin bit, else you can lock yourself out
- if ($user->id == user::active()->id) {
+ if ($user->id == Identity::active()->id) {
$form->edit_user->admin->disabled(1);
}
print $form;