please help with active user select |
dear all,
please help me with this script if ($this->form_validation->run() != FALSE){// echo 'valid'; $valid_user = $this->auth->trylogin($this->input->post("email"), $this->input->post("password")); if(!$valid_user) { $msg = '<div style="color: red;font-family:Letter Gothic Std;font-size: 12px;">' . lang('login_error') . '</div>'; } if($active = 0)) { $msg = 'your account is not active'; } else { redirect('product/catalogue'); } } i wanna make login check with active user alert. please help me .... thank you
udin_ordinary
What will you do with the variable $msg? Print it out ( echo $msg; ) or put it into a view .. ? In your i second if-statement you have to check the value with ($active == 0) ...
But if your return value is "false" on your login check you have to test for the correct type otherwise (like your e.g.) !$valid_user is the same as $active == 0 so both statements get true. And if your login check gives you also an active status with 0 or 1 back you have to check something like that: PHP Code: if ($valid_user === false) { echo "wahhhh"; } So other question is, where comes your $active variable?
|
Welcome Guest, Not a member yet? Register Sign In |