added login requirement to view articles to protect against potential data scrapping, with redirect functionality to the article the user attempts to view prior to login.
This commit is contained in:
@@ -14,7 +14,7 @@ if (isset($_POST['form_id'])) {
|
||||
$_POST['email'],
|
||||
$_POST['password'],
|
||||
$_POST['verify_password'],
|
||||
4, // TODO: Need to allow for other roles to be created, if the submission is from an administrator or owner.
|
||||
4, // TODO: Need to allow for other roles to be created, if the submission is from an administrator or owner.
|
||||
(!empty($_FILES) ? $_FILES : ''),
|
||||
(!empty($_POST['crop_x']) ? $_POST['crop_x'] : ''),
|
||||
(!empty($_POST['crop_y']) ? $_POST['crop_y'] : ''),
|
||||
@@ -35,7 +35,10 @@ if (isset($_POST['form_id'])) {
|
||||
);
|
||||
|
||||
if ($msg === true)
|
||||
header('Location: .');
|
||||
if (isset($_GET['redirect']))
|
||||
header('Location: ' . urldecode($_GET['redirect']));
|
||||
else
|
||||
header('Location: .');
|
||||
break;
|
||||
case 'reset_pw_form':
|
||||
$msg = reset_password(
|
||||
|
||||
Reference in New Issue
Block a user