[英]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.