Welcome Guest, Not a member yet? Register   Sign In
How use session?
#1

[eluser]siwymilek[/eluser]
Hi,
my name is Piotr, Im from Poland.
Sorry, but my English is poor.

I have a problem.
Can use standart CI session with database, but don't know check whether user is logged.
If data from form is correct, can create session to user.

Im looking the answer to my question in manual, but dont found.

Greetings from Poland,
Piotrek.
#2

[eluser]umefarooq[/eluser]
Hi welcome to CI
have you check CI user guide session you can save session in database, and you can check either user is logged in or not.

http://ellislab.com/codeigniter/user-gui...sions.html
#3

[eluser]Krzemo[/eluser]
Siema Smile
If you're writing your own user authentication: after successful login basically you can use $this->session->set_userdata('is_logged_in', 1) to save info weather user is logged in or not and $this->session->userdata('is_logged_in') to check status.

But if you don't need custom and sophisticated features, why reinvent the wheel? For those kind of stuff you can use 3rd party Code Igniter libraries i.e. dx_auth.

Regs
K.
#4

[eluser]siwymilek[/eluser]
@Cshamoh, siema! Smile
Thanks You for replay.
It's really helped me.
Greeting Smile




Theme © iAndrew 2016 - Forum software by © MyBB