Function __global->cns_read_in_member_profile
Definitions
sources/cns_general.php
- Get details on a member profile. This function aggregates a whole lot of data together and also makes some calculations.If something is not set, it's not set in the result map. We don't use blank or null here.See the member_personal_links_and_details function for a non-CNS specific UI retriever.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member to get details of |
| $need | ?array | No | No | Null | N/A | N/A | Array of details needed to be returned (it will return more than specified, but this helps performance). Actually even requested stuff may not be set if it's not defined. (null: return everything) |
| $include_encrypted_cpfs | boolean | No | No | False | N/A | N/A | Whether to include encrypted CPFs |
| $cpf_preview_mode | ?boolean | No | No | Null | N/A | N/A | Whether to only gather preview CPFs. (null: don't care). |
| $member_id_viewing | ?MEMBER | No | No | Null | N/A | N/A | The member viewing the details. (null: current member) |
Returns
- A map of details (null: not found)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get details on a member profile. This function aggregates a whole lot of data together and also makes some calculations.If something is not set, it's not set in the result map. We don't use blank or null here.See the member_personal_links_and_details function for a non-CNS specific UI retriever.
*
* @param MEMBER $member_id The member to get details of
* @param ?array $need Array of details needed to be returned (it will return more than specified, but this helps performance). Actually even requested stuff may not be set if it's not defined. (null: return everything)
* @param boolean $include_encrypted_cpfs Whether to include encrypted CPFs
* @param ?boolean $cpf_preview_mode Whether to only gather preview CPFs. (null: don't care).
* @param ?MEMBER $member_id_viewing The member viewing the details. (null: current member)
* @return ?array A map of details (null: not found)
*/
function cns_read_in_member_profile(int $member_id, ?array $need = null, bool $include_encrypted_cpfs = false, ?bool $cpf_preview_mode = null, ?int $member_id_viewing = null) : ?array
* Get details on a member profile. This function aggregates a whole lot of data together and also makes some calculations.If something is not set, it's not set in the result map. We don't use blank or null here.See the member_personal_links_and_details function for a non-CNS specific UI retriever.
*
* @param MEMBER $member_id The member to get details of
* @param ?array $need Array of details needed to be returned (it will return more than specified, but this helps performance). Actually even requested stuff may not be set if it's not defined. (null: return everything)
* @param boolean $include_encrypted_cpfs Whether to include encrypted CPFs
* @param ?boolean $cpf_preview_mode Whether to only gather preview CPFs. (null: don't care).
* @param ?MEMBER $member_id_viewing The member viewing the details. (null: current member)
* @return ?array A map of details (null: not found)
*/
function cns_read_in_member_profile(int $member_id, ?array $need = null, bool $include_encrypted_cpfs = false, ?bool $cpf_preview_mode = null, ?int $member_id_viewing = null) : ?array
