I am working with custom module of activecollab, I need to know how can I fetch logged in user data with the help of below object
$this->logged_user
or if anyone have another method to grab logged in user then please letme know, I just want to print logged in user info/data on my page
Modified:
When I use this object in model it couldn't work for me, So anyone have idea of any object of logged in user? by that I can grab logged user id or other stuff; and can work with that object in model as well ?
ah finaly got a solution ...
in activecollab you can get a logged in user object by this line in everywhere where you dont have user object $this->logged_user
$this->logged_user = Authentication::getLoggedUser();
and to get logged in user other basic informations you can use:
$this->logged_user->getId()
$this->logged_user->getName()
$this->logged_user->getDisplayName()
$this->logged_user->getEmail()
$this->logged_user->getCompany()
$this->logged_user->isAdministrator()
$this->logged_user->getLanguage()