Skip to content

Instantly share code, notes, and snippets.

@fritids
Created October 1, 2015 21:25
Show Gist options
  • Select an option

  • Save fritids/23380efb5efaf82b625c to your computer and use it in GitHub Desktop.

Select an option

Save fritids/23380efb5efaf82b625c to your computer and use it in GitHub Desktop.
wip phpbb
<?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