1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

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
This commit is contained in:
epriestley 2016-06-22 11:42:58 -07:00
parent 2cb779575d
commit 60c55387ab
2 changed files with 5 additions and 1 deletions

View file

@ -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;
}

View file

@ -222,7 +222,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
}
if ($user) {
if ($user->isLoggedIn()) {
if ($user->isUserActivated()) {
$offset = $user->getTimeZoneOffset();
$ignore_key = PhabricatorTimezoneIgnoreOffsetSetting::SETTINGKEY;