@@ -27,16 +27,11 @@ public function __construct()
2727 load_textdomain ('featherbb ' , $ this ->feather ->forum_env ['FEATHER_ROOT ' ].'featherbb/lang/ ' .$ this ->user ->language .'/admin/users.mo ' );
2828 }
2929
30- public function __autoload ($ class_name )
31- {
32- require $ this ->feather ->forum_env ['FEATHER_ROOT ' ] . $ class_name . '.php ' ;
33- }
34-
3530 public function display ()
3631 {
3732 // Move multiple users to other user groups
3833 if ($ this ->request ->post ('move_users ' ) || $ this ->request ->post ('move_users_comply ' )) {
39- if ($ this ->user ->g_id > FEATHER_ADMIN ) {
34+ if ($ this ->user ->g_id > $ this -> feather -> forum_env [ ' FEATHER_ADMIN ' ] ) {
4035 throw new Error (__ ('No permission ' ), 403 );
4136 }
4237
@@ -54,7 +49,7 @@ public function display()
5449
5550 // Delete multiple users
5651 if ($ this ->request ->post ('delete_users ' ) || $ this ->request ->post ('delete_users_comply ' )) {
57- if ($ this ->user ->g_id > FEATHER_ADMIN ) {
52+ if ($ this ->user ->g_id > $ this -> feather -> forum_env [ ' FEATHER_ADMIN ' ] ) {
5853 throw new Error (__ ('No permission ' ), 403 );
5954 }
6055
@@ -72,7 +67,7 @@ public function display()
7267
7368 // Ban multiple users
7469 if ($ this ->request ->post ('ban_users ' ) || $ this ->request ->post ('ban_users_comply ' )) {
75- if ($ this ->user ->g_id != FEATHER_ADMIN && ($ this ->user ->g_moderator != '1 ' || $ this ->user ->g_mod_ban_users == '0 ' )) {
70+ if ($ this ->user ->g_id != $ this -> feather -> forum_env [ ' FEATHER_ADMIN ' ] && ($ this ->user ->g_moderator != '1 ' || $ this ->user ->g_mod_ban_users == '0 ' )) {
7671 throw new Error (__ ('No permission ' ), 403 );
7772 }
7873
@@ -107,8 +102,8 @@ public function display()
107102 $ paging_links = '<span class="pages-label"> ' . __ ('Pages ' ) . ' </span> ' . Url::paginate_old ($ num_pages , $ p , '?find_user=& ' .implode ('& ' , $ search ['query_str ' ]));
108103
109104 // Some helper variables for permissions
110- $ can_delete = $ can_move = $ this ->user ->g_id == FEATHER_ADMIN ;
111- $ can_ban = $ this ->user ->g_id == FEATHER_ADMIN || ($ this ->user ->g_moderator == '1 ' && $ this ->user ->g_mod_ban_users == '1 ' );
105+ $ can_delete = $ can_move = $ this ->user ->g_id == $ this -> feather -> forum_env [ ' FEATHER_ADMIN ' ] ;
106+ $ can_ban = $ this ->user ->g_id == $ this -> feather -> forum_env [ ' FEATHER_ADMIN ' ] || ($ this ->user ->g_moderator == '1 ' && $ this ->user ->g_mod_ban_users == '1 ' );
112107 $ can_action = ($ can_delete || $ can_ban || $ can_move ) && $ num_users > 0 ;
113108 $ this ->feather ->template ->addAsset ('js ' , 'style/imports/common.js ' , array ('type ' => 'text/javascript ' ));
114109
0 commit comments