This topic is locked

Hiding Checkbox from Users

9/7/2007 10:01:35 AM
ASPRunnerPro General questions
M
mkueffner author

Hello,
I am trying to hide a checkbox from users accept the admin user.
$smarty->assign("admin_user", $_SESSION["UserID"]=="admin");
I am adding the above code to BeforeShowEdit. After adding this I get Page Cannot Be Displayed.
Any ideas?
Thanks in advance,

Mark

Sergey Kornilov admin 9/7/2007

Mark,
this code snippet works in PHPRunner only.
in ASPRunnerPro use the following:

smarty.Add "admin_user", SESSION("UserID")="admin"
M
mkueffner author 9/7/2007

Mark,

this code snippet works in PHPRunner only.
in ASPRunnerPro use the following:

smarty.Add "admin_user", SESSION("UserID")="admin"


That did it. Thanks!

Mark

M
mkueffner author 9/9/2007

[quote name='kuef' post='21198' date='Sep 7 2007, 11:23 AM']
Is it possible to add this functionality to multiple users or groups?
Thank you,

Mark

Sergey Kornilov admin 9/9/2007

You can use SESSION("GroupID") that holds user group name.

M
mkueffner author 9/9/2007

You can use SESSION("GroupID") that holds user group name.


Works great. Thank you!

M
mkueffner author 9/10/2007

Lastly,
Is it possible to add this functionality to two separete users or groups? I have been asked to have one checkbox visible to one group and another checkbox visible to yet another user or group. This should be my last question regarding this question!
Thanks,

Mark