Skip to content

Commit 9eb07b5

Browse files
authored
Look up account by username instead of using the default account (#23681)
1 parent 17f111d commit 9eb07b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPress/Classes/Services/AccountService.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ - (NSManagedObjectID *)createOrUpdateAccountWithUserDetails:(RemoteUser *)remote
156156
{
157157
NSManagedObjectID * __block accountObjectID = nil;
158158
[self.coreDataStack.mainContext performBlockAndWait:^{
159-
accountObjectID = [[WPAccount lookupDefaultWordPressComAccountInContext:self.coreDataStack.mainContext] objectID];
159+
accountObjectID = [[WPAccount lookupWithUsername:remoteUser.username context:self.coreDataStack.mainContext] objectID];
160160
}];
161161

162162
if (accountObjectID) {

0 commit comments

Comments
 (0)