/** * Return an array containing all profiles for a given user, * including global profiles * @param int $p_user_id * @return array */ function profile_get_all_for_user($p_user_id) { return profile_get_all_rows($p_user_id, $p_user_id != ALL_USERS); }
/** * Return an array containing all profiles for a given user, * including global profiles * @param int $p_user_id * @return array */ function profile_get_all_for_user( $p_user_id ) { if( ALL_USERS == $p_user_id ) { return profile_get_all_rows( ALL_USERS ); } else { $t_profiles_array = array_merge( profile_get_all_rows( ALL_USERS ), profile_get_all_rows( $p_user_id ) ); asort( $t_profiles_array ); return $t_profiles_array; } }
function profile_get_global() { return profile_get_all_rows(ALL_USERS); }