aboutsummaryrefslogtreecommitdiff
path: root/app/FreshRSS.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/FreshRSS.php')
-rw-r--r--app/FreshRSS.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index d578beac4..c48ad2093 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -54,6 +54,8 @@ class FreshRSS extends Minz_FrontController {
Minz_ExtensionManager::enableByList($ext_list);
}
+ self::checkEmailValidated();
+
Minz_ExtensionManager::callHook('freshrss_init');
}
@@ -144,4 +146,20 @@ 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('auth', 'logout')
+ );
+ if ($email_not_verified && !$action_is_allowed) {
+ Minz_Request::forward(array(
+ 'c' => 'user',
+ 'a' => 'validateEmail',
+ ), true);
+ }
+ }
}