summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-28 09:19:19 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-09-28 09:19:19 -0400
commit9003f830efcdc92865754a5d62e9fd2fea172af7 (patch)
tree52f24c0ac1d0c701b7562087bee33b2a2ad6e281 /app/Controller
parent4aa99e949224279ad64be26806e2657e66bf5adf (diff)
Move methods getIpAddress() and getUserAgent() to the Request class
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/User.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/Controller/User.php b/app/Controller/User.php
index c94c2c88..cc7464e6 100644
--- a/app/Controller/User.php
+++ b/app/Controller/User.php
@@ -34,12 +34,11 @@ class User extends Base
$this->response->redirect('?controller=app');
}
- $redirect_query = $this->request->getStringParam('redirect_query');
$this->response->html($this->template->layout('user_login', array(
'errors' => array(),
'values' => array(),
'no_layout' => true,
- 'redirect_query' => $redirect_query,
+ 'redirect_query' => $this->request->getStringParam('redirect_query'),
'title' => t('Login')
)));
}
@@ -56,9 +55,10 @@ class User extends Base
list($valid, $errors) = $this->authentication->validateForm($values);
if ($valid) {
- if ($redirect_query != "") {
+ if ($redirect_query !== '') {
$this->response->redirect('?'.$redirect_query);
- } else {
+ }
+ else {
$this->response->redirect('?controller=board');
}
}
@@ -420,6 +420,7 @@ class User extends Base
'errors' => array('login' => t('Google authentication failed')),
'values' => array(),
'no_layout' => true,
+ 'redirect_query' => '',
'title' => t('Login')
)));
}
@@ -481,6 +482,7 @@ class User extends Base
'errors' => array('login' => t('GitHub authentication failed')),
'values' => array(),
'no_layout' => true,
+ 'redirect_query' => '',
'title' => t('Login')
)));
}