Singleton Patern & Session problem |
[eluser]Neric[/eluser]
Hello, I'm french dev, and I want to make a little site for me with Doctrine & CodeIgniter. I got problem with your Singleton Pattern : Current_User PasteBin : Singleton Current User I want to create an article in my ArticleController (but I can't retrive the Username (or any attribut) of the user connected) : Code: $article = new Articles(); Quote:// ERROR : I don't understand ?! In any views, when I write : echo " Username: " . Current_User::user()->Username; I've no problem ... I supposed there is a particularity with controller ?! Thank a lot Ps1 : $autoload['libraries'] = array('database','session'); autoload.php Ps2 : sorry for my poor English ^^ Neric
[eluser]danmontgomery[/eluser]
Quote:A PHP Error was encountered This would be a good place to start...
[eluser]Neric[/eluser]
In fact, I've 2 functions in my controller : - show form - submit the form (insert in DB) Code: function create() But I don't understand why ?! An idea ? Thx |
Welcome Guest, Not a member yet? Register Sign In |