mirror of
https://github.com/friendica/friendica
synced 2025-04-21 22:30:11 +00:00
API: New classes for OAuth and basic auth
This commit is contained in:
parent
246aa293d1
commit
acbe9ebf9e
9 changed files with 346 additions and 178 deletions
|
@ -54,7 +54,7 @@ abstract class ContactEndpoint extends BaseApi
|
|||
*/
|
||||
protected static function getUid(int $contact_id = null, string $screen_name = null)
|
||||
{
|
||||
$uid = self::$current_user_id;
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
if ($contact_id || $screen_name) {
|
||||
// screen_name trumps user_id when both are provided
|
||||
|
@ -129,7 +129,7 @@ abstract class ContactEndpoint extends BaseApi
|
|||
protected static function ids($rel, int $uid, int $cursor = -1, int $count = self::DEFAULT_COUNT, bool $stringify_ids = false)
|
||||
{
|
||||
$hide_friends = false;
|
||||
if ($uid != self::$current_user_id) {
|
||||
if ($uid != self::getCurrentUserID()) {
|
||||
$profile = Profile::getByUID($uid);
|
||||
if (empty($profile)) {
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Profile not found'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue