Changeset 1826 for trunk/bp-groups/bp-groups-classes.php
- Timestamp:
- 09/08/2009 08:41:08 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups/bp-groups-classes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r1809 r1826 542 542 } 543 543 544 function promote() { 545 // Check the users current status 546 547 // Not letting mods be promoted to admins right now. In the future though yes. 548 if ( $this->is_admin || $this->is_mod ) 549 return false; 550 551 $this->is_mod = 1; 544 function promote( $status = 'mod' ) { 545 if ( 'mod' == $status ) { 546 $this->is_admin = 0; 547 $this->is_mod = 1; 548 $this->user_title = __( 'Group Mod', 'buddypress' ); 549 } 550 551 if ( 'admin' == $status ) { 552 $this->is_admin = 1; 553 $this->is_mod = 0; 554 $this->user_title = __( 'Group Admin', 'buddypress' ); 555 } 556 552 557 return $this->save(); 553 558 } 554 559 555 function demote() { 556 if ( $this->is_admin ) 557 return false; 558 559 if ( !$this->is_mod ) 560 return false; 561 560 function demote() { 562 561 $this->is_mod = 0; 562 $this->is_admin = 0; 563 $this->user_title = false; 564 563 565 return $this->save(); 564 566 }
Note: See TracChangeset
for help on using the changeset viewer.