Dreamcatchers
Posts: 120
|
| Posted: 11/09/2007, 2:12 PM |
|
I have a page that should display specific information from the user record when the page is opened.
I need to lookup the user when the page opens based on the user_id sessions variable set from their login.
I am stumped on how to do this. Any suggestions?
_________________
Training and LMS Developer |
 |
 |
Oper
Posts: 1195
|
| Posted: 11/09/2007, 2:18 PM |
|
ccgetuserid()
what are you displaying grid? form? or just a label?
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
ReneS
Posts: 225
|
| Posted: 11/10/2007, 2:59 AM |
|
Hi,
Once a user logs in, a session is started (CCS does that for you). In your security settings of the project, you can "connect" your user table to "UserID" from the session that CCS starts. After this, you can use the UserID as any other parameter you normally use. Set it in the grid etc. as "where" parameter > YourUserID=UserID > set type to session.
Hope I explained it well enough. (I'm not the real expert)
Good luck,
Rene
|
 |
 |
Dreamcatchers
Posts: 120
|
| Posted: 11/10/2007, 5:28 AM |
|
I am displaying a form with two labels ( an image url and a memo field). I placed the session variable ccgetuserid() in the where clause on the record and it is not causing a lookup. I beleive it may be syntax.
On the visual query builder I define the where clause as :
field user_id
condition equals(=)
parameter ccgetuserid()
Am I setting this in the wrong place or is it a syntax issue?
_________________
Training and LMS Developer |
 |
 |
Dreamcatchers
Posts: 120
|
| Posted: 11/10/2007, 6:43 AM |
|
I have it figured out thanks to an online tutorial posted by Global Develop
http://www.serversa.com/swftut/ccgetuserid.html
My error was in not changing the type field from URL to expression.
making the sql query an expression and using the ccgetuserid session variable works great.
Thanks!
_________________
Training and LMS Developer |
 |
 |
wkempees
|
| Posted: 11/10/2007, 10:15 AM |
|
OR
field user_id
condition equals(=)
parameter UserID
type session
|
|
|
 |