that's because you're not a friend with yourself Ben... at least according to your elgg system you aren't. ;)
if($non_friend->guid == $_SESSION['user']->guid){
// remove from array
}
The non_friend guid would be one of the users fetched from your array.
The sesson user guid is the guid of the logged in user. If they match, the system should remove the non_friend from the array.
Then you won't appear as a non_friend of yourself. ;)
Thak you @Trajan its working...
welcome
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.