mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Fix a bug where Phortune accounts created via "Create Account" would not have the viewer added as a member
Summary: Ref T12451. When you explicitly created a second or third account or whatever, you wouldn't be added as a member. (The editor sees that you're "already a member", so it doesn't add you.) Test Plan: - Go to `/phortune/`. - Click "Switch Accounts". - Click "Create Account". - Create an account. - Before patch: unable to view it since you don't get added as a member. - After patch: account created with you as member. - Also created an accont with multiple members. - Tried to create an account with no members. - Tried to create an account with just someone else as a member. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12451 Differential Revision: https://secure.phabricator.com/D17690
This commit is contained in:
parent
7274e4857c
commit
e1a8b5d3e9
1 changed files with 2 additions and 4 deletions
|
@ -16,10 +16,8 @@ final class PhortuneAccount extends PhortuneDAO
|
|||
private $memberPHIDs = self::ATTACHABLE;
|
||||
|
||||
public static function initializeNewAccount(PhabricatorUser $actor) {
|
||||
$account = id(new PhortuneAccount());
|
||||
$account->memberPHIDs = array($actor->getPHID() => $actor->getPHID());
|
||||
|
||||
return $account;
|
||||
return id(new self())
|
||||
->attachMemberPHIDs(array());
|
||||
}
|
||||
|
||||
public static function createNewAccount(
|
||||
|
|
Loading…
Reference in a new issue