summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-03-09 16:14:49 +0100
committeremkael <emkael@tlen.pl>2016-03-09 16:14:49 +0100
commit8bcee8a976362bb2b23af6306cfcd1339380bd60 (patch)
treecdb103f9aac8ada0398360d363bf783a4ccd0e45 /app
parent58eeaba11f1abcccb947fa907c9eb23dc12a76f6 (diff)
* URL construction fixes
Diffstat (limited to 'app')
-rw-r--r--app/php/pages/Login.php7
-rw-r--r--app/php/pages/Signup.php7
2 files changed, 8 insertions, 6 deletions
diff --git a/app/php/pages/Login.php b/app/php/pages/Login.php
index d7be42b..c4d33c2 100644
--- a/app/php/pages/Login.php
+++ b/app/php/pages/Login.php
@@ -6,13 +6,16 @@ class Login extends TPage {
if ($this->Page->IsValid) {
$this->Response->redirect(
$this->Application->getModule('auth')->ReturnUrl
- ?: NULL
+ ?: $this->Service->constructUrl(NULL)
);
}
}
public function validatePassword($sender, $param) {
- $param->IsValid = $this->Application->getModule('auth')->login($this->Login->Text, $this->Password->Text);
+ $param->IsValid = $this->Application->getModule('auth')->login(
+ $this->Login->Text,
+ $this->Password->Text
+ );
}
}
diff --git a/app/php/pages/Signup.php b/app/php/pages/Signup.php
index c999e65..4ee62dd 100644
--- a/app/php/pages/Signup.php
+++ b/app/php/pages/Signup.php
@@ -15,10 +15,9 @@ class Signup extends TPage {
$newUser->Password = password_hash($this->Password->Text, PASSWORD_DEFAULT);
$newUser->IsAdmin = $this->Admin->Checked;
$newUser->save();
- $this->Response->redirect($this->Request->constructUrl(
- $this->Service->ID,
- NULL
- ));
+ $this->Response->redirect(
+ $this->Service->constructUrl(NULL)
+ );
}
}