We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
AccountDoa.findUserAccountByApiKey(apiKey)
1 parent 305a0a8 commit 8029ef3Copy full SHA for 8029ef3
server/src/main/java/com/cloud/user/AccountManagerImpl.java
@@ -3049,7 +3049,14 @@ protected void updateLoginAttemptsWhenIncorrectLoginAttemptsEnabled(UserAccount
3049
3050
@Override
3051
public Pair<User, Account> findUserByApiKey(String apiKey) {
3052
- return _accountDao.findUserAccountByApiKey(apiKey);
+ UserAccount userAccount = _userAccountDao.getUserByApiKey(apiKey);
3053
+ if (userAccount != null) {
3054
+ User user = _userDao.getUser(userAccount.getId());
3055
+ Account account = _accountDao.findById(userAccount.getAccountId());
3056
+ return new Pair<>(user, account);
3057
+ } else {
3058
+ return null;
3059
+ }
3060
}
3061
3062
0 commit comments