diff options
| author | 2019-10-31 18:15:47 +0100 | |
|---|---|---|
| committer | 2019-10-31 18:15:47 +0100 | |
| commit | 3aa66f317b496ccd9a2df914bbc747c52081a7ad (patch) | |
| tree | 6a3f3f74899801abdca00546e213dfdc141c53cf /app/FreshRSS.php | |
| parent | 82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (diff) | |
| parent | fcae48f313d399050cb15f37a8a73ae52fc67796 (diff) | |
Merge pull request #2599 from FreshRSS/dev1.15.0
FreshRSS 1.15
Diffstat (limited to 'app/FreshRSS.php')
| -rw-r--r-- | app/FreshRSS.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 8f614c538..d472a2147 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -53,6 +53,10 @@ class FreshRSS extends Minz_FrontController { $ext_list = FreshRSS_Context::$user_conf->extensions_enabled; Minz_ExtensionManager::enableByList($ext_list); } + + self::checkEmailValidated(); + + Minz_ExtensionManager::callHook('freshrss_init'); } private static function initAuth() { @@ -142,4 +146,22 @@ class FreshRSS extends Minz_FrontController { FreshRSS_Share::load(join_path(APP_PATH, 'shares.php')); self::loadStylesAndScripts(); } + + private static function checkEmailValidated() { + $email_not_verified = FreshRSS_Auth::hasAccess() && FreshRSS_Context::$user_conf->email_validation_token !== ''; + $action_is_allowed = ( + Minz_Request::is('user', 'validateEmail') || + Minz_Request::is('user', 'sendValidationEmail') || + Minz_Request::is('user', 'profile') || + Minz_Request::is('user', 'delete') || + Minz_Request::is('auth', 'logout') || + Minz_Request::is('javascript', 'nonce') + ); + if ($email_not_verified && !$action_is_allowed) { + Minz_Request::forward(array( + 'c' => 'user', + 'a' => 'validateEmail', + ), true); + } + } } |
