Created
October 1, 2015 21:25
-
-
Save fritids/23380efb5efaf82b625c to your computer and use it in GitHub Desktop.
Revisions
-
andrewtch created this gist
Jul 2, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ <?php function login_test($username, $password) { if ($username == $password) { mysql_connect('localhost', 'root'); mysql_select_db('phpbb'); $exists = mysql_num_rows(mysql_query('SELECT * FROM '.USERS_TABLE.' WHERE username = \''.$username.'\'')) == 1; return array( 'status' => $exists ? LOGIN_SUCCESS : LOGIN_SUCCESS_CREATE_PROFILE, 'error_msg' => '', 'user_row' => array( 'user_id' => 7, 'username' => $username, 'user_password' => '', 'user_email' => '[email protected]', 'group_id' => 0, 'user_type' => USER_NORMAL ) ); } } function validate_session_test($user_row) { return true; }