Created
October 1, 2015 21:25
-
-
Save fritids/23380efb5efaf82b625c to your computer and use it in GitHub Desktop.
wip phpbb
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 characters
| <?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; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment