"Add Friend" button for users that are already registered
(This is copy of the post on WP support forum, maybe here it will get noticed)
When I invite someone who is already registered, plugin warns that
$email is already registered on this site.
If there are many users and you know only user email but not his/her username, it is almost impossible to find them. Is it possible to add button or at least link to that user’s profile?
I found that “by-email.php” on line 1118 generates error message
$returned_data['error_message'] .= sprintf( __( "%s is already a registered user of the site.", 'bp-invite-anyone'), $email );
Would it be possible to insert before this line something like
$ia_invitee = get_user_by( 'email' , $email ); $ia_invitee_data = get_userdata ($ia_invitee->ID); $ia_invitee_url = $ia_invitee_data->user_url;
and then add this url to the generated error message, so that inviter can immediately go to invitee profile and add him as a friend?
- The topic ‘"Add Friend" button for users that are already registered’ is closed to new replies.