Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Getting Correct Logged in UserID
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting Correct Logged in UserID

 Post Reply Post Reply
Author
PrivateEye View Drop Down
Groupie
Groupie
Avatar

Joined: 21 March 2003
Location: United Kingdom
Status: Offline
Points: 168
Post Options Post Options   Thanks (0) Thanks(0)   Quote PrivateEye Quote  Post ReplyReply Direct Link To This Post Topic: Getting Correct Logged in UserID
    Posted: 23 September 2005 at 2:01pm
I want to get the AuthorID of the logged in user. Actually I am facing strange problem. I am using forum code in the mini Search engine of wwf and I restricted users so that they can't add URL without first logging in as follows

'add_url_form.asp page code

If intGroupID = 2 Then
     Response.Write vbCrLf & strTxtInsufficientPermison
Else
    Display add URL form
End If

and in add_url.asp page I save logged in user ID like this

rsAddURL.AddNew
rsAddURL.Fields("Author_ID") = CLng(lngLoggedInUserID)
rsAddURL.Update

When I insert a URL, it saves my correct Author_ID where as when another user save, it save "2" for Author_ID.

Can anyone help me how it is going like this.


The Judgement Day
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2005 at 2:08pm
it should be ok, if you are using that verible after the common.asp page

is a little weird.

CLng(lngLoggedInUserID) is the user ID.

it should say all users ID, 2 is the guest account ID
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.