I Installed two Components in my Joomla website. After Login my site. I print User Id, that id is 22. and goto one component page(Site Part) I print User Id, that id is 3 (super User). Why User Id is Changing. what is my Mistake?
May be in that component they load super user , eg., in email template they have to send email to admin and super user.
$user = JFactory::getUser($user_id);
using this we can change user object by passing user id
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.