summaryrefslogtreecommitdiff
path: root/app/FreshRSS.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/FreshRSS.php')
-rw-r--r--app/FreshRSS.php22
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);
+ }
+ }
}