Changeset 7041 for trunk/tests/testcases/members/functions.php
- Timestamp:
- 05/09/2013 01:20:02 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/tests/testcases/members/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/members/functions.php
r7034 r7041 16 16 parent::tearDown(); 17 17 $this->set_current_user( $this->old_current_user ); 18 }19 20 /**21 * We can't use grant_super_admin() because we will need to modify22 * the list more than once, and grant_super_admin() can only be run23 * once because of its global check24 */25 public function grant_super_admin( $user_id ) {26 global $super_admins;27 if ( ! is_multisite() ) {28 return;29 }30 31 $user = get_userdata( $user_id );32 $super_admins[] = $user->user_login;33 }34 35 public function restore_admins() {36 // We assume that the global can be wiped out37 // @see grant_super_admin()38 unset( $GLOBALS['super_admins'] );39 18 } 40 19
Note: See TracChangeset
for help on using the changeset viewer.