Print Page | Close Window

Getting Correct Logged in UserID

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=16667
Printed Date: 15 April 2026 at 7:38pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Getting Correct Logged in UserID
Posted By: PrivateEye
Subject: Getting Correct Logged in UserID
Date 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



Replies:
Posted By: dj air
Date 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



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