Tuesday, February 23, 2016

[Cakephp3] Best way to change database on the fly by user

Hello !

I used cakephp 3 to implement my apps and it's awesome :)

Now I try to implement datasource by user:
- one datasource by request
- every user can use diffrent database

 Now i used vars cache and read it after user login in tables static function defaultConnectionName this solution isn't brilliant but works.

Maybe you can give better solutions.



--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
 
We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon.
 
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: