Rob King
|
Posted: 08/24/2003, 2:49 AM |
|
Hi there,
I am new at asp and codechard, and am setting up a website with user forums.
The thing i cant work or to do is the user information.
When some one logs in I want to be able to show the users name in the main
page ie "Welcome Rob" or if no user is logged in to say "Welcome Guest"
When a user has logged it, and goes to create a new message I want to be
able to automatically past the uses id into it.
and last thing how can I get the user only to edit there user information.
Any help on theses would be appreciated.
Thanks
Rob King
|
|
|
Dave Rexel
|
Posted: 08/24/2003, 8:03 AM |
|
Hi Rob
this is from the Help File ASP section (its useful to specify your
environment eg w2k-sp4, CCS2.1.1.20, ASP, ACCESS to get better response)
CCGetUserID Function
Description
Retrieves the primary key value that uniquely identifies the currently
logged in user.
Syntax
CCGetUserID()
Specification
Return Value
Type: integer
Example 1
This code would usually be placed in the Before Show event of a Record form.
if tasks.EditMode then
tasks.user_id_assign_by.Value = CCDLookUp("emp_name", "employees",
"emp_id=" & CCToSQL(tasks.user_id_assign_by.Value,"Integer") , DBIntranetDB)
else
tasks.user_id_assign_by.Value = CCDLookUp("emp_name", "employees",
"emp_id=" & CCToSQL(CCGetUserID,"Integer"), DBIntranetDB)
end if
'-------------
Use the CCGetUserID Function to get the logged in users ID and use this to
filter the records.
If you're very new to CCS then doing the Tutorial a couple of times will
help you to understand how to use the program better as there are workflows
not apparent in the programs interface.
Greetings
Dave
|
|
|
|