FuelPHP Bin
<?php // add the custom class to your app bootstrap Autoloader::add_classes(array( // our custom auth classes 'Auth_Login_Customauth' => APPPATH.'classes/auth/login/customauth.php', )); <?php // the app auth.php config return array( 'driver' => 'Customauth', 'verify_multiple_logins' => false, 'salt' => 'some-secure-salt-here', ); <?php // this is the skeleton for customauth.php class Auth_Login_Customauth extends \Auth\Auth_Login_Simpleauth { /** * Check the user exists, we accept email only * * @return bool */ public function validate_user($email = '', $password = '') { $email = trim($email) ?: trim(\Input::post(\Config::get('simpleauth.username_post_key', 'username'))); $password = trim($password) ?: trim(\Input::post(\Config::get('simpleauth.password_post_key', 'password'))); if (empty($email) or empty($password)) { return false; } $password = $this->hash_password($password); $user = \DB::select_array(\Config::get('simpleauth.table_columns', array('*'))) ->where_open() ->where('email', '=', $email) ->where_close() ->where('password', '=', $password) ->from(\Config::get('simpleauth.table_name')) ->execute(\Config::get('simpleauth.db_connection'))->current(); return $user ?: false; } }