Skip to content

Instantly share code, notes, and snippets.

@alexdunae
Created December 1, 2010 19:22
Show Gist options
  • Save alexdunae/724052 to your computer and use it in GitHub Desktop.
Save alexdunae/724052 to your computer and use it in GitHub Desktop.
Sample code for Simplelogin-Secure
<?php
// load the library
$this->load->library('SimpleLoginSecure');
// create a new user
$this->simpleloginsecure->create('user@example.com', 'uS$rpass!');
// attempt to login
if($this->simpleloginsecure->login('user@example.com', '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