Просмотр исходного кода

#4734 OAuth2: api /m/oauth2/api/user now returns api /m/oauth2/api/me data instead of particular profile data

Alex Trofimov 2 лет назад
Родитель
Сommit
bcd7e3e7f0
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      modules/boonex/oauth2/classes/BxOAuthAPI.php

+ 2 - 2
modules/boonex/oauth2/classes/BxOAuthAPI.php

@@ -116,10 +116,10 @@ class BxOAuthAPI extends BxDol
         if (!($oProfile = $this->_getProfileWithAccessChecking($iProfileId)))
             return;
 
-        if (!($oProfile = BxDolProfile::getInstance($aToken['user_id'])))
+        if (!(BxDolProfile::getInstance($aToken['user_id'])))
             return;
 
-        $this->output($this->_prepareProfileArray($oProfile, !isAdmin($oProfile->getAccountId())));
+        $this->output($this->_prepareProfileArray($oProfile, !isAdmin()));
     }
 
     /**