$user = User::staticGet('id', $appUser->profile_id);
if (!empty($user)) {
if (!$user->hasRight(Right::API)) {
$user = User::staticGet('id', $appUser->profile_id);
if (!empty($user)) {
if (!$user->hasRight(Right::API)) {
// TRANS: OAuth exception given when no user was found for a given token (no token was found).
throw new OAuthException(_('No user for that token.'));
}
// TRANS: OAuth exception given when no user was found for a given token (no token was found).
throw new OAuthException(_('No user for that token.'));
}