Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9021751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:19:49+00:00 2026-06-16T05:19:49+00:00

How can I get the logged in user’s UserId? I’m using the standard system

  • 0

How can I get the logged in user’s UserId? I’m using the standard system generated AccountModel. I can get the username using:

User.Identity.Name

but I don’t see the UserId field. I want to use the UserId as a foreign key for another table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:19:50+00:00Added an answer on June 16, 2026 at 5:19 am

    I think you’re looking for ProviderUserKey – Gets the user identifier from the membership data source for the user.

    object id = Membership.GetUser().ProviderUserKey
    

    Membership.GetUser() – Gets the information from the data source and updates the last-activity date/time stamp for the current logged-on membership user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can any one help me to get logged in user's info like email id,name,city
How can I get Logged in Facebook user's name if I get access token
How can I get firstname and last name of facebook user while using f-connect?
I know that you can get the username of the currently logged in user
I can get the file path with: (message (file-name-directory (or buffer-file-name load-file-name))) But if
I'm using xauth, and can successfully get an access token, but can't work out
In GAE, you can say users.get_current_user() to get the currently logged-in user implicit to
I have the IP address, but for some reason I can get the name
How can I get the distinguished name from Active Directory of the currently logged
For my iPhone app, an user can logged in using Facebook, then the app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.