Welcome Guest, Not a member yet? Register   Sign In
front and back offcie

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?


[eluser]louis w[/eluser]
There are authentication libs which have already been developed for CI. Did you try searching the forums?

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.

If you insist on using PHP essions over CI ones, you need to remember to start the session (using session_start())

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


Have a look at http://codeigniter.com/wiki/Category:Con...entication

Theme © iAndrew 2016 - Forum software by © MyBB