Buddypress integration problem
-
I have the simple LDAP login plugin up and running and working great in high security mode and creating wordpress user accounts for previously unregistered users. I was having a problem with integrating with buddypress however, as the user account was creating the user_nicename with a space between the first and second names, which broke the user profile page by creating an unlinkable url. I managed to get around it by changing the code as follows:
original:
if( is_array($userinfo) ) { $user_data['user_nicename'] = $userinfo['givenname'][0] . ' ' . $userinfo['sn'][0]; $user_data['user_email'] = $userinfo['mail'][0]; $user_data['display_name'] = $user_data['user_nicename'] $user_data['first_name'] = $userinfo['givenname'][0]; $user_data['last_name'] = $userinfo['sn'][0]; }hacked:
if( is_array($userinfo) ) { $user_data['user_nicename'] = $username; $user_data['user_email'] = $userinfo['mail'][0]; $user_data['display_name'] = $userinfo['givenname'][0] . ' ' . $userinfo['sn'][0]; $user_data['first_name'] = $userinfo['givenname'][0]; $user_data['last_name'] = $userinfo['sn'][0]; }
The topic ‘Buddypress integration problem’ is closed to new replies.