Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/registration.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-08-18 18:03:39 +0300
committerJoas Schilling <coding@schilljs.com>2020-08-18 18:03:39 +0300
commit47b01c6639b7f4bce5cba07aaa679aa0286a4ffc (patch)
treea5d110e3f758b0ba3f7c8ee1e5d4ecfbcd1b2bcb /lib
parent459c9e0454b1ac1f9408fc8da393a830f68ce427 (diff)
Fix minor issues
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/RegisterController.php8
-rw-r--r--lib/Db/Registration.php2
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/Controller/RegisterController.php b/lib/Controller/RegisterController.php
index a34c168..deb7e55 100644
--- a/lib/Controller/RegisterController.php
+++ b/lib/Controller/RegisterController.php
@@ -131,7 +131,11 @@ class RegisterController extends Controller {
);
}
- return new TemplateResponse('registration', 'form', ['email' => $registration->getEmail(), 'token' => $registration->getToken()], 'guest');
+ return new TemplateResponse('registration', 'form', [
+ 'email' => $registration->getEmail(),
+ 'email_is_login' => $this->config->getAppValue('registration', 'email_is_login', '0') === '1',
+ 'token' => $registration->getToken(),
+ ], 'guest');
} catch (RegistrationException $exception) {
return $this->renderError($exception->getMessage(), $exception->getHint());
}
@@ -147,7 +151,7 @@ class RegisterController extends Controller {
public function createAccount($token) {
$registration = $this->registrationService->getRegistrationForToken($token);
if ($this->config->getAppValue('registration', 'email_is_login', '0') === '1') {
- $username = $registration->email;
+ $username = $registration->getEmail();
} else {
$username = $this->request->getParam('username');
}
diff --git a/lib/Db/Registration.php b/lib/Db/Registration.php
index e88b5fa..46dbbb1 100644
--- a/lib/Db/Registration.php
+++ b/lib/Db/Registration.php
@@ -47,7 +47,7 @@ use OCP\AppFramework\Db\Entity;
*/
class Registration extends Entity {
public $id;
- public $email;
+ protected $email;
protected $username;
protected $displayname;
protected $password;