Changeset 1942 for sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/rosetta-roles.php
- Timestamp:
- 10/06/2015 03:05:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/rosetta-roles.php
r1864 r1942 315 315 316 316 if ( ! is_user_member_of_blog( $user_details->ID ) ) { 317 wp_redirect( add_query_arg( array( 'error' => 'not-a-member' ), $redirect ) ); 318 exit; 317 $added = add_existing_user_to_blog( array( 'user_id' => $user_details->ID, 'role' => 'subscriber' ) ); 318 if ( ! $added || is_wp_error( $added ) ) { 319 wp_redirect( add_query_arg( array( 'error' => 'not-added-to-site' ), $redirect ) ); 320 exit; 321 } 322 323 // Refresh user data 324 $user_details = get_user_by( 'id', $user_details->ID ); 319 325 } 320 326 … … 525 531 526 532 'error' => array( 527 'no-user-found' => __( 'The user couldn’t be found.', 'rosetta' ), 528 'not-a-member' => __( 'The user is not a member of this site.', 'rosetta' ), 529 'user-cannot' => __( 'The user is not a translation editor.', 'rosetta' ), 530 'user-exists' => __( 'The user is already a translation editor.', 'rosetta' ), 533 'no-user-found' => __( 'The user couldn’t be found.', 'rosetta' ), 534 'not-a-member' => __( 'The user is not a member of this site.', 'rosetta' ), 535 'not-added-to-site' => __( 'The user couldn’t be added to this site.', 'rosetta' ), 536 'user-cannot' => __( 'The user is not a translation editor.', 'rosetta' ), 537 'user-exists' => __( 'The user is already a translation editor.', 'rosetta' ), 531 538 ), 532 539 );
Note: See TracChangeset
for help on using the changeset viewer.