Make WordPress Core

Changeset 23358


Ignore:
Timestamp:
01/31/2013 01:15:25 AM (12 years ago)
Author:
SergeyBiryukov
Message:

Pass old roles to set_user_role action. props awellis13. fixes #19134.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r23117 r23358  
    804804            unset( $this->caps[$oldrole] );
    805805
     806        $old_roles = $this->roles;
    806807        if ( !empty( $role ) ) {
    807808            $this->caps[$role] = true;
     
    813814        $this->get_role_caps();
    814815        $this->update_user_level_from_caps();
    815         do_action( 'set_user_role', $this->ID, $role );
     816        do_action( 'set_user_role', $this->ID, $role, $old_roles );
    816817    }
    817818
Note: See TracChangeset for help on using the changeset viewer.