Skip to content

Commit c484771

Browse files
Apply suggestion from @bernardodemarco
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
1 parent 5d22e56 commit c484771

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3827,10 +3827,11 @@ public void buildACLViewSearchCriteria(SearchCriteria<? extends ControlledViewEn
38273827

38283828
@Override
38293829
public UserAccount getUserByApiKey(String apiKey) {
3830+
ApiKeyPairVO keyPair = apiKeyPairDao.findByApiKey(apiKey);
3831+
38303832
if (keyPair == null) {
38313833
return null;
38323834
}
3833-
ApiKeyPairVO keyPair = apiKeyPairDao.findByApiKey(apiKey);
38343835

38353836
return userAccountDao.findById(keyPair.getUserId());
38363837
}

0 commit comments

Comments
 (0)