sync
This commit is contained in:
+28
-2
@@ -1,4 +1,30 @@
|
||||
<?php
|
||||
include_once ('includes/sql.php');
|
||||
include_once('sql.php');
|
||||
|
||||
function login($username, $password_hash) {}
|
||||
function authorize($username, $password_hash)
|
||||
{
|
||||
$pw_hash = get_account_login($username);
|
||||
pretty_print($pw_hash);
|
||||
|
||||
if (!empty($pw_hash)) {
|
||||
if ($password_hash == $pw_hash) {
|
||||
$user = get_account_info($username);
|
||||
pretty_print($user);
|
||||
// $_SESSION['is_logged_in'] = true;
|
||||
// $_SESSION['username'] = $username;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function pretty_print($input)
|
||||
{
|
||||
echo '
|
||||
<pre>
|
||||
' . print_r($input) . '
|
||||
</pre>
|
||||
';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user