son.of.the.morning Posted July 20, 2012 Share Posted July 20, 2012 I need to be able to create a global var of the current user so i don?t have to re-define it every time i query. I would i thought that this would of been suitable in the app controller but it seems as thought am wrong, any suggestions Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/ Share on other sites More sharing options...
trq Posted July 20, 2012 Share Posted July 20, 2012 sessions? Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/#findComment-1362997 Share on other sites More sharing options...
son.of.the.morning Posted July 20, 2012 Author Share Posted July 20, 2012 I could session it yes but it's not efficent enough for what i am doing. Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/#findComment-1363004 Share on other sites More sharing options...
trq Posted July 20, 2012 Share Posted July 20, 2012 Then what other global variable do you expect to be using exactly? Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/#findComment-1363183 Share on other sites More sharing options...
son.of.the.morning Posted July 23, 2012 Author Share Posted July 23, 2012 I am constantly calling the Auth var for user id in almost all of my controllers/actions so i would of preferred it if i could of had it defined in global state for consistency Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/#findComment-1363629 Share on other sites More sharing options...
trq Posted July 23, 2012 Share Posted July 23, 2012 That doesn't answer the question. Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/#findComment-1363637 Share on other sites More sharing options...
son.of.the.morning Posted July 23, 2012 Author Share Posted July 23, 2012 I think you will find it does. Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/#findComment-1363642 Share on other sites More sharing options...
trq Posted July 23, 2012 Share Posted July 23, 2012 I think you will find it does not. Quote Link to comment https://forums.phpfreaks.com/topic/265984-cakephp-and-global-vars/#findComment-1363643 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.