if(Input::post()) { $is_active = Model_Users::find() ->where('username', Input::post('username')) ->get_one(); if(Auth::instance()->login(Input::post('username'), Input::post('password'))) { $user = Model_Users::find() ->where('username', Input::post('username')) ->get_one(); $user->last_ip_address = $user->ip_address; $user->ip_address = Input::real_ip(); if($user->save()) { Session::set('user_id', $user->user_id); Session::set_flash('success', 'Logged in.'); var_dump(Auth::check()); // returns true all the time //Response::redirect('list'); } } }
'index_file' => false, 'packages' => array( 'orm', 'auth', ),app/config/db.php
return array( 'active' => 'default', 'default' => array( 'type' => 'mysqli', 'connection' => array( 'hostname' => 'localhost', 'port' => '3306', 'database' => 'newdatabase', 'username' => 'root', 'password' => 'pass', 'persistent' => false, ), 'table_prefix' => '', 'charset' => 'utf8', 'caching' => false, 'profiling' => false, ), );
It looks like you're new here. If you want to get involved, click one of these buttons!