Im using a business rule triggered before a new user is created to check for username uniqueness. Our company continues to add characters from the first name to build out a unique user name. For example Jdoe, Jodoe, JohDoe,etc.
I'm using the script referenced here: Unique Username
This script appears to be designed to do something similar, except that the first name is at the end of the username.
I modified the script to:
if (($firstName -ne $NULL) -and ($lastName -ne $NULL))
$username = $lastName
foreach ($char in $firstName.ToCharArray())
$username = "$char$username"
$uniqueUsername = $username
however, it builds the first name backwards. Like Jdoe, oJDoe, hoJDoe.
What can I do to fix this?