Documents and Documentation (beta 1) (#23)
- Change to SQLite document store - Complete documentation on usage of Feed Reader Central - Update INSTALLING.md for new installation procedures Reviewed-on: #23
This commit was merged in pull request #23.
This commit is contained in:
@@ -1,14 +1,23 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* User Log On Page
|
||||
*
|
||||
* Accepts the user's e-mail address (multi-user) and password (multi-user or single-user-with-password) and attempts
|
||||
* to log them on to Feed Reader Central
|
||||
*/
|
||||
|
||||
include '../../start.php';
|
||||
|
||||
$db = Data::getConnection();
|
||||
Security::verifyUser($db, redirectIfAnonymous: false);
|
||||
use FeedReaderCentral\{Key, Security};
|
||||
|
||||
Security::verifyUser(redirectIfAnonymous: false);
|
||||
|
||||
// Users already logged on have no need of this page
|
||||
if (key_exists(Key::USER_ID, $_SESSION)) frc_redirect('/');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
Security::logOnUser($_POST['email'] ?? '', $_POST['password'], $_POST['returnTo'] ?? null, $db);
|
||||
Security::logOnUser($_POST['email'] ?? '', $_POST['password'], $_POST['returnTo'] ?? null);
|
||||
// If we're still here, something didn't work; preserve the returnTo parameter
|
||||
$_GET['returnTo'] = $_POST['returnTo'];
|
||||
}
|
||||
@@ -37,4 +46,3 @@ page_head('Log On'); ?>
|
||||
</form>
|
||||
</article><?php
|
||||
page_foot();
|
||||
$db->close();
|
||||
|
||||
Reference in New Issue
Block a user