Posted by Sergey

Hello dear Tom.
This time my question about this. Can i print random info for random users, like this? ... <?php If ($system-->$isAdmin) { ?>admin info<?php } else if ($system->$isPeter) {?>info for Peter<?php } else if ($system->$isSofie) {?>info for Sofie<?php } ?>. Please give an example, what i must change to print info for Peter, Sofie and else needed users. <?php $users = $hm->Zb('rs:def:username'); if ($users=="Peter") {?> info for Peter <?php } else if ($users=="Sofie") {?>info for Sofie<?php } ?> not working( ..Thank you very much.
Posted by Tom


First of all, you need to identify the user logging in. This is how to obtain the user id of the user who accessed a page in the staff folder.
$user_id = $this->sys->AuthSession->GetV( $this->sys->Get( XA_FRAME_FIELDSET_ID ) );
You can see an example in web/staff/include/