Removed direct references to $_REQUEST and $_POST

This commit is contained in:
Deon George
2016-08-03 16:20:25 +10:00
parent 5f84d2c14f
commit 7adcd1d983
24 changed files with 85 additions and 85 deletions

View File

@@ -36,9 +36,9 @@ class Controller_Login extends lnApp_Controller_Login {
HTTP::redirect('welcome/index');
// If the user posted their details to reset their password
if ($_POST) {
if ($this->request->post()) {
// If the username is correct, create a method token
if (! empty($_POST['username']) AND ($ao=ORM::factory('Account',array('username'=>$_POST['username']))) AND $ao->loaded()) {
if ($this->request->post('username') AND ($ao=ORM::factory('Account',array('username'=>$this->request->post('username')))) AND $ao->loaded()) {
$mmto = ORM::factory('Module_Method_Token')
->method(array('account','user:resetpassword'))
->account($ao)
@@ -66,12 +66,12 @@ class Controller_Login extends lnApp_Controller_Login {
}
// Redirect to our password reset, the Auth will validate the token.
} elseif (! empty($_REQUEST['token'])) {
HTTP::redirect(URL::link('user','account/resetpassword?token='.$_REQUEST['token']));
} elseif ($this->request->query('token')) {
HTTP::redirect(URL::link('user','account/resetpassword?token='.$this->request->query('token')));
}
// Show our token screen even if the email was invalid.
if (isset($_POST['username']))
if ($this->request->post('username'))
$output = View::factory('pages/login_reset_sent');
else