I didn't have any luck with using the original set_userfields method. The aforementioned code had:
PHP Code:
$newuser->set_userfields($userFields);
It worked when I switched it to this:
PHP Code:
$newuser->set_userfields($userFields, true, admin);
I think it's because the account I was testing was my own account which was promoted to administrator.
Has anyone conceived of the idea or attempted setting the username to the LDAP 'displayname' or 'givenname' and 'sn' while allowing the user to both login and authenticate using their LDAP credentials? ie, login as: jdoe, but username is set to John Doe so that all posts, member list, user profile and all show John Doe. My forum is internal, consists only of LDAP users all on the same domain and I've disabled registration since the LDAP auth code can create a new user. I've made a user profile field set to displayname but if I don't have to go through and modify the template to show the displayname userfield in lieu of username, that would be awesome.
Unless it's easier now to modify the template using the built-in search/replace? Suggestions or ideas?