diff options
| author | 2019-10-31 18:15:47 +0100 | |
|---|---|---|
| committer | 2019-10-31 18:15:47 +0100 | |
| commit | 3aa66f317b496ccd9a2df914bbc747c52081a7ad (patch) | |
| tree | 6a3f3f74899801abdca00546e213dfdc141c53cf /app/Controllers/authController.php | |
| parent | 82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (diff) | |
| parent | fcae48f313d399050cb15f37a8a73ae52fc67796 (diff) | |
Merge pull request #2599 from FreshRSS/dev1.15.0
FreshRSS 1.15
Diffstat (limited to 'app/Controllers/authController.php')
| -rw-r--r-- | app/Controllers/authController.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php index ca44b1a96..e2e1aaa22 100644 --- a/app/Controllers/authController.php +++ b/app/Controllers/authController.php @@ -169,10 +169,6 @@ class FreshRSS_auth_Controller extends Minz_ActionController { return; } - if (!function_exists('password_verify')) { - include_once(LIB_PATH . '/password_compat.php'); - } - $s = $conf->passwordHash; $ok = password_verify($password, $s); unset($password); @@ -203,12 +199,22 @@ class FreshRSS_auth_Controller extends Minz_ActionController { /** * This action gives possibility to a user to create an account. + * + * The user is redirected to the home if he's connected. + * + * A 403 is sent if max number of registrations is reached. */ public function registerAction() { + if (FreshRSS_Auth::hasAccess()) { + Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true); + } + if (max_registrations_reached()) { Minz_Error::error(403); } + $this->view->show_tos_checkbox = file_exists(join_path(DATA_PATH, 'tos.html')); + $this->view->show_email_field = FreshRSS_Context::$system_conf->force_email_validation; Minz_View::prependTitle(_t('gen.auth.registration.title') . ' ยท '); } } |
