Thanks for the reply.
I have tried it and there is a unique key costraint on the [name] field...
So I've just created a custom bit of code that tries to create / edit the user in the RoleMembershipHelper.cs
Note: I've changed the SP [yaf_user_aspnet] to only match on [ProviderUserKey]
public static void UpdateForumUser( MembershipUser user, int pageBoardID )
{
if ( user == null ) // Check to make sure its not a guest
{
return;
}
// Get the emai stub (so email is not used as forum username) - jerry
string emailStub = user.Email;
int indexAT = emailStub.IndexOf("@");
if (indexAT > 1)
{
emailStub = emailStub.Substring(0, indexAT);
}
// Now try adding the user until a valid username is found (add index to stub until it is)
// NOTE: This is done to distinguish between jerry@unimail.com and jerry@gmail.com
int nUserID = 0;
int index = 0;
string userName = emailStub;
while (index < 10 && nUserID == 0)
{
nUserID = DB.user_aspnet(pageBoardID, userName, user.Email, user.ProviderUserKey, user.IsApproved);
index++;
userName = emailStub + index.ToString();
}
This seems to work so far!!
Thanks