travel-net
Posts: 56
|
Posted: 04/01/2004, 5:49 AM |
|
Hello,
I wan't to unhide a gridform based on the UserID. This is my code
global $NewGrid1;
if (CCGetUserID == 0) {
$NewGrid1->Visible = false;
} else {
$NewGrid1->Visible = false;
}
User logs in: Hide Grid
Guest views page: Unhide Grid
What is wrong?
Regards,
Frans
|
|
|
lvalverdeb
Posts: 299
|
Posted: 04/01/2004, 6:42 AM |
|
It is probably just a typo in your message, but the correct function name is CCGetUserID(). Also, you can get the same results using the following one-liner:
$NewGrid1->Visible = (CCGetUserID() > 0);
This code should make your grid visible if the value of CCGetUserID is greater than zero and invisible if not.
You may also want to check your else statement.
Luis
_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4 |
|
|
travel-net
Posts: 56
|
Posted: 04/01/2004, 6:57 AM |
|
Hello Luis,
Changed your oneliner, because it was the other way round.
$NewGrid1->Visible = (CCGetUserID() == 0);
Thanks for it
Frans
|
|
|
|