From 60c55387ab3b717eec855bf050616cee175dda55 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 22 Jun 2016 11:42:58 -0700 Subject: [PATCH] Don't show client-side setup prompts until user accounts activate Summary: Fixes T11198. These are confusing or premature if you aren't an activated user: disabled or unapproved accounts won't be able to act on them. Test Plan: Changed timezone, went through flow to correct it Reviewers: chad Reviewed By: chad Maniphest Tasks: T11198 Differential Revision: https://secure.phabricator.com/D16167 --- src/applications/people/storage/PhabricatorUser.php | 4 ++++ src/view/page/PhabricatorStandardPageView.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php index 5e8cb77a72..81a5126474 100644 --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -94,6 +94,10 @@ final class PhabricatorUser * @return bool True if this is a standard, usable account. */ public function isUserActivated() { + if (!$this->isLoggedIn()) { + return false; + } + if ($this->isOmnipotent()) { return true; } diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index e37da7c5ea..866268c710 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -222,7 +222,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView } if ($user) { - if ($user->isLoggedIn()) { + if ($user->isUserActivated()) { $offset = $user->getTimeZoneOffset(); $ignore_key = PhabricatorTimezoneIgnoreOffsetSetting::SETTINGKEY;