This project is read-only.

UserID in Users table

Jul 8, 2012 at 11:03 AM

I'm in process of integrating your forum feature "Login with Facebok" but I don't know where you store the "UserID". I loop through Sessions and Cookies and I don't see it there.  Can you show me how to reference the UserID?

Sorry about too many questions.

Jul 8, 2012 at 11:51 AM
Edited Jul 8, 2012 at 12:23 PM

        NearForums.Web.Controllers.UsersController objUser = new NearForums.Web.Controllers.UsersController();
        int ID = objUser.User.Id;



UserState objUser= new NearForums.Web.State.UserState


 Both of them aren't working and returns error.



Jul 8, 2012 at 2:07 PM
Edited Jul 8, 2012 at 2:09 PM

Oh well I got around by adding this line




] = User.Id;






in UserMenu.cshtml




Jul 8, 2012 at 2:52 PM

I don't really understand why you have to access the session data (nor for the FB authentication).

For the record, Facebook authentication works out of the box.


If you want to access user information on the view, use the properties @User (instance of type UserState)


would render the user identifier.

Jul 8, 2012 at 6:19 PM

I want to integrate the facebook users into my website.  That's why