Hi,
I have a page custom coded for Modx but the programmer who was working on it could not work because of his personal family issues. Now I am in a situation where I want to get this thing working but I can’t.
The situation is - there is a page on our site which can only be accessed by selected web users. In the snippet I have option to add user ids in the allowed web user’s array vairable. But it also asks me to allowed admin user ids too.
And in the other page - it checks for condition if admin user or web user from array is present - then only allow user to access. But I do not know it allows me only if admin from manager and web user both login at the same time.
Following is part of the code:
$admin_allowed_to_edit_array = array('1','2');
$webuser_allowed_to_edit_array = array('2','122');
if(isset($_SESSION['mgrValidated']) && (in_array($_SESSION['mgrRole'], $admin_allowed_to_edit_array)) || isset($_SESSION['webValidated']) && (in_array($_SESSION['webInternalKey'], $webuser_allowed_to_edit_array))){
$output ="";
I do not mind if someone want to access admin panel too. or if someone can do it for some fees - then also no issues at all.
Thanks
Deep