-
- 3,975 Posts
There are 2, [[membercheck]] and [[Personalize]] snippets in the default install for this kind of work.
Hope that helps.
regards,
zi
This function will only return "web" if it is being called from the front-end and a web user is logged in; it will only return "manager" if it is being called from the back-end and a manager user is logged in. It cannot be used to determine if a user is logged in as a manager user from a snippet in the front-end.
function getLoginUserType(){
if($this->isFrontend() && isset($_SESSION['webValidated'])) {
return 'web';
}
else if($this->isBackend() && isset($_SESSION['mgrValidated'])) {
return 'manager';
}
else return '';
}