I added a field o the users table called status, that I want to have 'active' or 'inactive' for the account, and when the user tries to login check the status on the users table.
I have a members controller where the login function is defined, everything is working perfectly I just need a way to deactivate accounts, since I didn't find that functionality built in.
I added a function on the model that return true or false for the status, like $active = $this->members->is_active but I need to pass the id or maybe the email but at what time can I do this?
My Login function:
public function login()
{
// Method should not be directly accessible
if( $this->uri->uri_string() == 'members/login')
show_404();
if( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' ) {
$this->require_min_level(2);
}
$this->setup_login_form();
$this->load->view('login_view');
}
Thank you for your help and for this great library