[英]Get User ID Changed in Joomla Site
I Installed two Components in my Joomla website. 我在Joomla网站上安装了两个组件。 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). 我打印用户ID,该ID为22,然后转到一个组件页面(站点部分),我打印用户ID,该ID为3(超级用户)。 Why User Id is Changing. 为什么用户ID正在更改。 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 使用这个我们可以通过传递用户ID来改变用户对象
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.