Print Page | Close Window

User ID, Login Status, Admin Status etc...

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29105
Printed Date: 28 March 2026 at 2:20pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: User ID, Login Status, Admin Status etc...
Posted By: VTBO
Subject: User ID, Login Status, Admin Status etc...
Date Posted: 04 February 2011 at 10:37am
I would like to integrate the forum into a website using the forum for the login and member info etc... is there a session or cookie that gets set with the author_ID and a logged in status as well as group id to determine if the user has admin privs?

If I include common.asp in my pages are there variables that I can use or functions to return the authorID etc... like GetUserID() ?  In testing i tried id=<%=lngLoggedInUserID%> however all it returns is a 2 when it should be returning a 1. So it is being initialized but not set from the login.

Thanks,

Phil



Replies:
Posted By: WebWiz-Bruce
Date Posted: 04 February 2011 at 6:35pm
Storing the member ID or group in a cookie would be very insecure as any one could easily change the cookie to be logged in as another member or change their group through the cookie.

To integrate the forums login have a look at the API's on the page below:-

http://www.webwiz.net/web-wiz-forums/kb/" rel="nofollow - http://www.webwiz.net/web-wiz-forums/kb/


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: VTBO
Date Posted: 04 February 2011 at 6:45pm
Ok I can understand that about cookies and the api that you have listed are for using a web sites login package and pushing it to the forum. 

I want to do the opposite.  Example if I am logged in with the forum, I would like to be able to know that within my portion of the web site. I would also like to know my author id, group id, name etc...  so that it can show me as logged in on the other web pages in the site and be able to go to  my non forum profile page for instance. Are there function calls to return these values? I have looked but apparently I am missing something.

Thanks,

Phil


Posted By: VTBO
Date Posted: 04 February 2011 at 7:20pm
Actually I see what the problem is now. It is because the cookies that are set that the forum uses show the path as /forum/ and it has the correct login tokens. When i am in the root of the site the path is / and instead of the logged in tokens it shows what I assume is random stuff for a guest (id 2) If i delete the cookies i can get it to work once, until i log out, once the root cookie / is written it is not overwritten by the /forum/ cookie when I log back in hence it always thinks it is a guest.


Posted By: alabamatoy
Date Posted: 04 February 2011 at 7:22pm
Sir Bruce - I fully agree about the cookie.  Your response indicates you are thinking that I should build a whole new app and integrate it with the forum login....I was thinking of just adding another table to the forum DB for the additional info and using the existing design of the forum to build upon and provide some additional functionality.


Posted By: VTBO
Date Posted: 04 February 2011 at 7:38pm
And problem fixed. By setting the cookie path to /  and commenting out the other option in the setup_options_inc.asp file the variables will now transfer through to the rest of the site.  You guys think of everything. Guess I need to read through the settings file a little bit more.

Thanks,

Phil



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net