Retrieving email from registerd users

Last post 09-05-2007 5:24 AM by Peter Smith. 1 replies.

Sort Posts:

  • Retrieving email from registerd users

    09-04-2007, 9:29 AM
    • Member
      22 point Member
    • Jonas_G
    • Member since 04-16-2007, 2:28 PM
    • Posts 76

    Hi

    I want to be able to send a logged in user an email, but how do i retrieve his/her email that they used then they created their account.

    I use the sqltableprofileprovider and i can access all other user info with profile.xxxxxxxxxx but not the email

    the email is in the aspnet_Membership table in the DB, how can i retreive that information in an easy way? 

  • Re: Retrieving email from registerd users

    09-05-2007, 5:24 AM
    Answer
    • Contributor
      4,290 point Contributor
    • Peter Smith
    • Member since 03-19-2005, 5:58 AM
    • Posts 1,606

    If you're able to retreive the userid of the logged in user with profile.userid, why not write you're own function that gets that info?

    pseudocode:

    private function getUserEmail(byval userid as guid) as string
    dim email as string=    select email from aspnet_Membership where userid=@userid
    return email
    end function

    hth

    please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already.
Page 1 of 1 (2 items)