We're sorry, but this discussion has just been closed to further replies.
$profile = XN_Profile::current();
$IsOnline = $profile->__get('presence');
if (strtolower($IsOnline) == "online")
$IsOnline = true;
else
$IsOnline = false;
Tags: __get, api, class, ning, online, php, presence, profile, user, xn_profile
class XG_PresenceHelper {
/**
* Returns whether to show the presence indicator for the given profile.
*
* @param XN_Profile The user's profile
* @return boolean Whether permission is granted
*/
public static function canShowPresenceIndicator($profile) {
return $profile->screenName == XN_Profile::current()->screenName || $profile->presence == 'online';
}
}
© 2009 Created by Ning Developer Admin