public static function getProfileOfUser($user){
        $profiles = $user->get_profiles_list();
        if (count($profiles) === 0 || $profiles[0]->isAnonymous()) {
            return null;
        } else {
            return $profiles[0];
        }
    }
public static function getProfileOfUser($user){
        $profiles = $user->get_profiles_list();
        if (count($profiles) === 0 || $profiles[0]->isAnonymous()) {
            return null;
        } else {
            return $profiles[0];
        }
    }
public static function getProfileOfUser ( $ user ) { $ profiles = $ user -> get_profiles_list ( ) ; if ( count ( $ profiles ) === 0 || $ profiles [ 0 ] -> isAnonymous ( ) ) { return null ; } else { return $ profiles [ 0 ] ; } }
Returns profile of given user. If no profile is created for given user returns null.
@param User_Account $user
Returns profile of given user . If no profile is created for given user returns null .