Page 1 of 1

Hide fields depending on the user

Posted: Wed Dec 10, 2014 11:14 pm
by josecnp1

I have this function working:

// Page Render event
function Page_Render() {
//echo "Page Render";
if(@$this->clv_parent->CurrentValue == 14){
$this->resultado->Visible = FALSE;
}
}

but I can not use "CurrentUserID()" in replacement of number "14"
I tried this:

if(@$this->clv_parent->CurrentValue == $CurrentUserID())

but does not work.


Re: Hide fields depending on the user

Posted: Thu Dec 11, 2014 1:53 am
by scs

josecnp1 wrote:
if(@$this->clv_parent->CurrentValue == $CurrentUserID())

how about
if ($this->clv_parent->CurrentValue == CurrentUserID())


Re: Hide fields depending on the user

Posted: Thu Dec 11, 2014 2:29 am
by josecnp1

thank you very much.
it works