front and back offcie |
[eluser]aktosci[/eluser]
I am doing a back office application. That means that user have to login. How do you do that ? do you have exemple ? Is the authentification system included in this framework of do I have to write it from scratch? Thanks.
[eluser]louis w[/eluser]
There are authentication libs which have already been developed for CI. Did you try searching the forums?
[eluser]aktosci[/eluser]
I created my own auth solution but as I use session it does not work echo "session".$_SESSION['user']; I got A PHP Error was encountered Severity: Notice Message: Undefined variable: _SESSION It does not work in controler but in a view only.
[eluser]louis w[/eluser]
Check out the Session Library. Code Igniter clears out the SESSION variable (and GET/POST) for security reasons. This is their built in library for interacting with the session. Offers some nice things like encryption, etc.
[eluser]Dam1an[/eluser]
If you insist on using PHP essions over CI ones, you need to remember to start the session (using session_start())
[eluser]aktosci[/eluser]
Thanks you I could do what I wanted ! On my view I change my Session php to session ci $this->session->set_userdata('ut', $_SESSION['us']); and then I can user on my model $this->session->userdata('ut');
[eluser]dsloan[/eluser]
Have a look at http://codeigniter.com/wiki/Category:Con...entication |
Welcome Guest, Not a member yet? Register Sign In |