get current logged in userID in aspnet mvc membership

Posted by FosterZ on Stack Overflow See other posts from Stack Overflow or by FosterZ
Published on 2010-05-07T16:09:24Z Indexed on 2010/05/07 16:38 UTC
Read the original article Hit count: 552

Filed under:
|

hi, i am trying to show a list of users of my application "school", when admin logs in then he can view all the users in list but when school principals logins, he should get only users of his school, So i thought to get the current loggedIn userId first and then by that userId i'll get schoolId since userId is foreign key in school table...once i'll get the schoolId i can show the members of that school.

But my problem is how to get the UserID of currently loggedIn. I'm using MVC 1.0 Asp.Net -- "Membership"

if my logic above is wrong then please tell me the alternate good idea, so that principal can see only his users list..

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc