Making WordPress.org

Changeset 1420


Ignore:
Timestamp:
03/19/2015 03:19:43 PM (9 years ago)
Author:
ocean90
Message:

Rosetta: Use $user->has_cap() to check if a user is already a translation editor.

see #741.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/rosetta-roles.php

    r1419 r1420  
    253253                    }
    254254
    255                     if ( user_can( $user_details, $this->translation_editor_role ) ) {
     255                    if ( $user_details->has_cap( $this->translation_editor_role ) ) {
    256256                        wp_redirect( add_query_arg( array( 'error' => 'user-exists' ), $redirect ) );
    257257                        exit;
Note: See TracChangeset for help on using the changeset viewer.