aad-sso-wordpress
aad-sso-wordpress copied to clipboard
Auto-Provision Usernames as Alias, Rather than Email Address
Currently users who are created via this plugin end up with a username format matching their email address. Prior to activating this plugin, our user sync through SAML created users based on their alias, so a user with the email address [email protected] was assigned the WP username bob. Under the new logic, Bob's username is [email protected]. Because we are authenticating to a BuddyPress social network, this username format makes @mentioning cumbersome.
The plugin is accounting for existing alias usernames like "bob" to be matched to Azure profiles like [email protected], but new users are being created with their email address as the username. If I manually change the username from [email protected] to bob, the plugin still recognizes this is the same user on subsequent authentications, but it would be awesome if there was a snippet I could add, or a toggle in the settings I'm not fully understanding, to switch this logic to auto-provision users with the alias as their username.
@mrjarbenne Thanks for this great feedback. This is definitely something we can consider for a future release.