Member.GetMemberFromLoginName(strUserName) failing at finding the user
Hi folks,
Before an user registers at my site, I proceed searching it's loginame so I can stop the proccess if the user logins exists. I tried to recover member data through GetMemberFromLogin but it returns null. What is wrong?
I guess these are members trying to register on your site, right? If so, why not use the standard asp.net controls (CreateUserWizard in particular) which will handle all this stuff for you?
"I guess these are members trying to register on your site, right?"
That's right!
"If so, why not use the standard asp.net controls (CreateUserWizard in particular) which will handle all this stuff for you?"
Because I am using a jquery ajax control, that runs very well and is pretty stable, furthermore, this jquery control fits my needs.
My user control is creating users to perfection but, I don't know how to retrieve Membership information from a login name so, when a user introduces a login name that exists in the database, a new user is created with the same login. Any idea?
It shouldn't be possible to create a new member with the same login name! I assume you'll be at least using the CreateUser() method available in the membership class (or the umbraco default one, or your custom one), right? If you don't, well, guess you're creating a real mess...
I think the answer to your question is rather simple: use this method and check the value of the out parameter status to check whether there's already a user with the login name.
Member.GetMemberFromLoginName(strUserName) failing at finding the user
Hi folks,
Before an user registers at my site, I proceed searching it's loginame so I can stop the proccess if the user logins exists. I tried to recover member data through GetMemberFromLogin but it returns null. What is wrong?
I Know the user exists, I created it before.
Thank you beforehand.
Sincere regards,
Eduardo Macho
Eduardo,
I guess these are members trying to register on your site, right? If so, why not use the standard asp.net controls (CreateUserWizard in particular) which will handle all this stuff for you?
Cheers,
/Dirk
Hi Dirk,
"I guess these are members trying to register on your site, right?"
That's right!
"If so, why not use the standard asp.net controls (CreateUserWizard in particular) which will handle all this stuff for you?"
Because I am using a jquery ajax control, that runs very well and is pretty stable, furthermore, this jquery control fits my needs.
My user control is creating users to perfection but, I don't know how to retrieve Membership information from a login name so, when a user introduces a login name that exists in the database, a new user is created with the same login. Any idea?
Thank you.
Regards,
Eduardo Macho
It shouldn't be possible to create a new member with the same login name! I assume you'll be at least using the CreateUser() method available in the membership class (or the umbraco default one, or your custom one), right? If you don't, well, guess you're creating a real mess...
I think the answer to your question is rather simple: use this method and check the value of the out parameter status to check whether there's already a user with the login name.
Hope this helps.
Regards,
/Dirk
Hi Dirk,
I fixed it, just a javascript problem.
Thank you for your answer!
Regards,
Eduardo
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.