Welcome Guest, Not a member yet? Register   Sign In
Simple Login Secure create user isue
#1

[eluser]BiSHGoD[/eluser]
Hello.
I use the Simple Login Secure library for my app to login. On my “Admin” section I use $this->simpleloginsecure->create() so the admins can create new users (I’m going to do similar for edit/delete).

For some reason when I issue that command to create a new user I automatically get logged in as that user even though I was originally logged in as a different user. I’m using $this->session->userdata[‘user’] to verify the user on every page which is where I notice the change. Also my new users aren't admins, so the "admin" link disappears.

Any reason why that is or how to stop it?

Thanks!
#2

[eluser]BiSHGoD[/eluser]
Never mind! I found the issue. By default it will auto-login as the user created (self-registration I assume). You need to give the function a boolean:
Code:
$this->simpleloginsecure->create($username, $password, false)

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB