WordPress.org

Ready to get started?Download WordPress

Forums

Simple LDAP Login
plugin-simple-ldap-login-user_nicename is created with a space (6 posts)

  1. lancehudson
    Member
    Posted 3 years ago #

    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 http://wordpress.org/support/topic/plugin-shibboleth-username-at-risk-of-breaking-permalinks-with-author
    http://codex.wordpress.org/Function_Reference/sanitize_title

    I 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'))
    				);
  2. Clifton Griffin
    Member
    Plugin Author

    Posted 3 years ago #

    Just saw this. I implemented it in my latest release.

    Thanks.

  3. suzhi1
    Member
    Posted 3 years ago #

    Did you removed it?
    In my version it is without sanitize_title and I get exactly the problem with the author page.

  4. Clifton Griffin
    Member
    Plugin Author

    Posted 3 years ago #

    Crap.

    It looks like I may have inadvertently removed it. I released a version with a lot of bugs and had to roll back some of the changes. Looks like I rolled back too much.

    Will attempt to release a patched version this weekend. Thanks.

  5. Clifton Griffin
    Member
    Plugin Author

    Posted 3 years ago #

    Version 1.4.0.4 uploaded. Let me know if you have further issues.

  6. suzhi1
    Member
    Posted 3 years ago #

    thx. works like a charm :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic