plugin-simple-ldap-login-user_nicename is created with a space
-
Creating the nicename with a space in it breaks %author% links. It is my understanding that the nicename should be passed through sanitize_title first. Which will convert the space to a dash.
See https://www.ads-software.com/support/topic/plugin-shibboleth-username-at-risk-of-breaking-permalinks-with-author
https://codex.www.ads-software.com/Function_Reference/sanitize_titleI haven’t finished testing yet but I changed to code to
$userData = array( 'user_pass' => microtime(), 'user_login' => $userinfo[0][samaccountname][0], 'user_nicename' => sanitize_title($userinfo[0][givenname][0] .' '.$userinfo[0][sn][0]), 'user_email' => $userinfo[0][mail][0], 'display_name' => $userinfo[0][givenname][0] .' '.$userinfo[0][sn][0], 'first_name' => $userinfo[0][givenname][0], 'last_name' => $userinfo[0][sn][0], 'role' => strtolower(get_option('simpleldap_account_type')) );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘plugin-simple-ldap-login-user_nicename is created with a space’ is closed to new replies.