Skip to content

Commit

Permalink
Fixed regression that required for plans to be always there
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Chernyshev committed Jun 1, 2014
1 parent b3fb6fb commit 8501599
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ private function init() {
}

$invitation_account = null;
$plan = null;
if (!is_null($invitation)) {
$invitation_account = $invitation->getAccount();

Expand All @@ -528,11 +529,12 @@ private function init() {
) {
$invitation_account->addUser($this);
}

$plan = $invitation->getPlan();
}

$new_user_account = null;
if (is_null($invitation_account) || UserConfig::$createPersonalAccountsIfInvitedToGroupAccount) {
$plan = $invitation->getPlan();
if ($plan) {
$new_user_account = Account::createAccount($this->name, $plan->getSlug(), null, $this, Account::ROLE_ADMIN);
} else {
Expand Down

0 comments on commit 8501599

Please sign in to comment.