Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - User ID, Login Status, Admin Status etc...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

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

 Post Reply Post Reply
Author
VTBO View Drop Down
Newbie
Newbie


Joined: 01 November 2008
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote VTBO Quote  Post ReplyReply Direct Link To This Post Topic: User ID, Login Status, Admin Status etc...
    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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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:-

Back to Top
VTBO View Drop Down
Newbie
Newbie


Joined: 01 November 2008
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote VTBO Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
VTBO View Drop Down
Newbie
Newbie


Joined: 01 November 2008
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote VTBO Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
alabamatoy View Drop Down
Groupie
Groupie


Joined: 04 February 2006
Location: United States
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote alabamatoy Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
VTBO View Drop Down
Newbie
Newbie


Joined: 01 November 2008
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote VTBO Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.