开发者

changing user model won't let me pull from Users now

开发者 https://www.devze.com 2023-03-24 04:13 出处:网络
I have 1 database linking to 2 apps. For the second app, I change the Auth table like so... $this->Auth->userModel = \'newAuthTable\';

I have 1 database linking to 2 apps. For the second app, I change the Auth table like so...

$this->Auth->userModel = 'newAuthTable';

The only p开发者_开发技巧roblem now is that I still want to run queries against my User model for the users table but it's pulling from 'newAuthTable' when I call $users = $this->User->find('all');

How can I run a query on the User model still?

Thank you.


Once the user is authenticated, change it back:

$this->Auth->userModel = 'users';
0

精彩评论

暂无评论...
验证码 换一张
取 消