Getting list of followers

Can some one assist to get the list of following persons of a given user ? As the below array lists friends as well as followers from entity_relationships table

$options = array(
    'relationship' => 'friend',
    'relationship_guid' => $owner->getGUID(),
    'inverse_relationship' => False,
    'type' => 'user',
    'full_view' => FALSE
);

 

I need to filter and output the names of followers only (single way friends not two way friends)

  • $owner = elgg_get_page_owner_entity();
    
    //or
    
    //$owner = elgg_get_logged_in_user_entity();
    
    $dbprefix = elgg_get_config('dbprefix');
    $getter = 'elgg_get_entities_from_relationship';
    $followers_content = [
        'relationship' => 'friend',
        'relationship_guid' => $owner->getGUID(),
        'inverse_relationship' => true,
        'type' => 'user',
        'joins' => array("JOIN {$dbprefix}users_entity ue ON e.guid = ue.guid"),
        'order_by' => 'ue.name ASC',
        'full_view' => false,
        'no_results' => elgg_echo('friends:none'),
    ];