Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eduardo 106 posts 130 karma points
    Sep 23, 2010 @ 15:19
    Eduardo
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 23, 2010 @ 16:37
    Dirk De Grave
    0

    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

  • Eduardo 106 posts 130 karma points
    Sep 23, 2010 @ 16:55
    Eduardo
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 23, 2010 @ 20:18
    Dirk De Grave
    0

    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

  • Eduardo 106 posts 130 karma points
    Sep 24, 2010 @ 08:46
    Eduardo
    0

    Hi Dirk,

    I fixed it, just a javascript problem.

    Thank you for your answer!

    Regards,
    Eduardo

     

  • 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.

Please Sign in or register to post replies