Im Having a problem with login. It was working perfectly fine until i made the login as default controller page. but now it not working. I tried updating the password still no success.
Here is My Log file
DEBUG - 2017-07-10 11:51:41 --> Total execution time: 0.1743
DEBUG - 2017-07-10 11:51:42 --> UTF-8 Support Enabled
DEBUG - 2017-07-10 11:51:42 --> Global POST, GET and COOKIE data sanitized
DEBUG - 2017-07-10 11:51:42 --> Config file loaded: C:\wamp64\www\webaccounts\application\config/db_tables.php
DEBUG - 2017-07-10 11:51:42 --> Config file loaded: C:\wamp64\www\webaccounts\application\third_party/community_auth/config/db_tables.php
DEBUG - 2017-07-10 11:51:42 --> Config file loaded: C:\wamp64\www\webaccounts\application\config/authentication.php
DEBUG - 2017-07-10 11:51:43 --> Config file loaded: C:\wamp64\www\webaccounts\application\third_party/community_auth/config/authentication.php
DEBUG - 2017-07-10 11:51:43 --> Session: "sess_save_path" is empty; using "session.save_path" value from php.ini.
DEBUG - 2017-07-10 11:51:43 --> Encryption: Auto-configured driver 'openssl'.
DEBUG - 2017-07-10 11:51:43 --> Session class already loaded. Second attempt ignored.
DEBUG - 2017-07-10 11:51:43 --> Tokens class already loaded. Second attempt ignored.
DEBUG - 2017-07-10 11:51:43 --> Authentication class already loaded. Second attempt ignored.
DEBUG - 2017-07-10 11:51:43 -->
string = skunkbot
password = pawan1212
form_token =
token_jar = ["fa72f57a","48602bf2","8ccfde89","dc3284ed","14891698","1a2545eb","c3f39347","24ef42bf","db139efa","74167e56","c20f513d"]
Controller
Code:
public function login()
{
if( $this->uri->uri_string() == 'app/login')
show_404();
if(!$this->verify_min_level(1) || !$this->verify_min_level(3) || !$this->verify_min_level(6))
{
$this->is_logged_in();
$this->tokens->name = 'login_token';
if( $this->authentication->on_hold === TRUE )
{
$data['on_hold_message'] = 1;
}
// This check for on hold is for normal login attempts
else if( $on_hold = $this->authentication->current_hold_status() )
{
$data['on_hold_message'] = 1;
}
$link_protocol = USE_SSL ? 'https' : NULL;
$html = $this->load->view('login/login', '', TRUE);
echo $html;
}
}
/**
Ajax Login
*/
public function ajax_attempt_login()
{
if( $this->input->is_ajax_request() )
{
// Allow this page to be an accepted login page
$this->config->set_item('allowed_pages_for_login', ['app/ajax_attempt_login'] );
// Make sure we aren't redirecting after a successful login
$this->authentication->redirect_after_login = FALSE;
// Do the login attempt
$this->auth_data = $this->authentication->user_status( 0 );
// Set user variables if successful login
if( $this->auth_data )
$this->_set_user_variables();
// Call the post auth hook
$this->post_auth_hook();
// Login attempt was successful
if( $this->auth_data )
{
echo json_encode([
'status' => 1,
'user_id' => $this->auth_user_id,
'username' => $this->auth_username,
'level' => $this->auth_level,
'role' => $this->auth_role,
'email' => $this->auth_email
]);
}
// Login attempt not successful
else
{
$this->tokens->name = 'login_token';
$on_hold = (
$this->authentication->on_hold === TRUE OR
$this->authentication->current_hold_status()
)
? 1 : 0;
echo json_encode([
'status' => 0,
'count' => $this->authentication->login_errors_count,
'on_hold' => $on_hold,
'token' => $this->tokens->token()
]);
}
}
// Show 404 if not AJAX
else
{
show_404();
}
}
View
Code:
<form id="login_from" method="POST">
<fieldset class="clearfix">
<p><span class="fa fa-user"></span><input type="text" <input type="text" name="login_string" id="login_string" class="form_input" autocomplete="off" maxlength="255" Placeholder="Username" required></p> <!-- JS because of IE support; better: placeholder="Username" -->
<p><span class="fa fa-lock"></span><input type="password" type="password" name="login_pass" id="login_pass" autocomplete="off" readonly="readonly" onfocus="this.removeAttribute('readonly');" Placeholder="Password" <?php if( config_item('max_chars_for_password') > 0 ) echo 'maxlength="' . config_item('max_chars_for_password') . '"'; ?> required></p> <!-- JS because of IE support; better: placeholder="Password" -->
<input type="hidden" id="max_allowed_attempts" value="<?php echo config_item('max_allowed_attempts'); ?>" />
<input type="hidden" id="mins_on_hold" value="<?php echo ( config_item('seconds_on_hold') / 60 ); ?>" />
<?php
if( config_item('allow_remember_me') )
{
?>
<p> <label class="checkbox-inline"><input type="checkbox" id="remember_me" name="remember_me" value="yes" />Remember Me</label></p>
<?php
}
?>