简体   繁体   English

我如何获取cakephpcakedc用户中的当前登录用户

[英]how do i get the current logged in users in cakephp cakedc users

please, can some one tell me how to get the current logged in user in CAKEDC users plugin in cake php. 请有人可以告诉我如何在cake php的CAKEDC users插件中获取当前登录的用户。 i want to be able to use it at will within the application. 我希望能够在应用程序中随意使用它。 just as wordpress' : loggedin_user(), get_current_user(). 就像wordpress一样:loginin_user(),get_current_user()。

generally once a user goes through Auth in CakePHP, the way to get the user is $this->Auth->user(); 通常,一旦用户在CakePHP中通过Auth,获得用户的方法就是$ this-> Auth-> user();。 Go ahead and try that in the controller ;). 继续并在控制器中尝试它;)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Cakephp 3中扩展Cakedc用户插件以使用自己的表 - How to extend Cakedc Users plugin to use own table in Cakephp 3 如何使cakedc用户在cakephp的整个应用程序中可用 - How to make cakedc Users available in the whole application in cakephp CakePHP-2.0,如何设置与CakeDC-Users用户模型和Post模型之间的模型关系? - CakePHP-2.0, How can i set model relation with CakeDC-Users User model with Post model? CakeDC用户插件:如何安装CakeDC用户插件,我已阅读文档 - CakeDC users plugin: How can i install cakedc users plugin, i have read the documentation 初学者:cakephp 3.6安装cakedc / users - Beginner: cakephp 3.6 installing cakedc/users Cakephp:CakeDC用户插件并保存另一个表 - Cakephp: CakeDC Users plugin and save another table CakePHP 3-如何阻止未登录用户的页面并将其重定向到登录页面? - CakePHP 3 - How do I block pages from non logged in users and redirect them to the login page? 如何跟踪已登录用户的活动? - How do I track the activity of logged in users? 如何为已登录和已注销的用户构建文件夹? - How do I structure folders for users logged in and logged out? CakePHP-设置与插件中的文件夹相关的viewPath(CakeDC用户插件) - CakePHP - Set viewPath in relation to a folder within a Plugin (CakeDC Users Plugin)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM