Created
December 1, 2010 19:22
-
-
Save alexdunae/724052 to your computer and use it in GitHub Desktop.
Sample code for Simplelogin-Secure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// load the library | |
$this->load->library('SimpleLoginSecure'); | |
// create a new user | |
$this->simpleloginsecure->create('[email protected]', 'uS$rpass!'); | |
// attempt to login | |
if($this->simpleloginsecure->login('[email protected]', 'uS$rpass!')) { | |
// success | |
} | |
// check if logged in | |
if($this->session->userdata('logged_in')) { | |
// logged in | |
} | |
// logout | |
$this->simpleloginsecure->logout(); | |
// delete by user ID | |
$this->simpleloginsecure->delete($user_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment