[ Index ]

PHP Cross Reference of BuddyPress




/src/bp-xprofile/classes/ -> class-bp-xprofile-profiledata.php (summary)

BuddyPress XProfile Classes.

File Size: 732 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BP_XProfile_ProfileData:: (16 methods):

Class: BP_XProfile_ProfileData  - X-Ref

Class for XProfile Profile Data setup.

__construct( $field_id = null, $user_id = null )   X-Ref
BP_XProfile_ProfileData constructor.

param: int|null $field_id Field ID to instantiate.
param: int|null $user_id  User ID to instantiate for.
since: 1.5.0

populate( $field_id, $user_id )   X-Ref
Populates the XProfile profile data.

param: int $field_id Field ID to populate.
param: int $user_id  User ID to populate for.
since: 1.0.0

exists()   X-Ref
Check if there is data already for the user.

since: 1.0.0
return: bool

is_valid_field()   X-Ref
Check if this data is for a valid field.

since: 1.0.0
return: bool

save()   X-Ref
Save the data for the XProfile field.

since: 1.0.0
return: bool

delete()   X-Ref
Delete specific XProfile field data.

since: 1.0.0
return: boolean

get_data_for_user( $user_id, $field_ids )   X-Ref
Get a user's profile data for a set of fields.

param: int   $user_id   ID of user whose data is being queried.
param: array $field_ids Array of field IDs to query for.
since: 2.0.0
return: array

get_all_for_user( $user_id )   X-Ref
Get all of the profile information for a specific user.

param: int $user_id ID of the user.
since: 1.2.0
return: array

get_fielddataid_byid( $field_id, $user_id )   X-Ref
Get the user's field data id by the id of the xprofile field.

param: int $field_id Field ID being queried for.
param: int $user_id  User ID associated with field.
since: 1.6.0
return: int $fielddata_id

get_value_byid( $field_id, $user_ids = null )   X-Ref
Get profile field values by field ID and user IDs.

Supports multiple user IDs.

param: int            $field_id ID of the field.
param: int|array|null $user_ids ID or IDs of user(s).
since: 1.0.0
return: string|array Single value if a single user is queried,

get_value_byfieldname( $fields, $user_id = null )   X-Ref
Get profile field values by field name and user ID.

param: array|string $fields  Field(s) to get.
param: int|null     $user_id User ID to get field data for.
since: 1.0.0
return: array|bool

delete_for_field( $field_id )   X-Ref
Delete field.

param: int $field_id ID of the field to delete.
since: 1.0.0
return: bool

get_last_updated( $user_id )   X-Ref
Get time for last XProfile field data update by user.

param: int $user_id User ID to get time for.
since: 1.0.0
return: null|string

delete_data_for_user( $user_id )   X-Ref
Delete all data for provided user ID.

param: int $user_id User ID to remove data for.
since: 1.0.0
return: false|int

get_random( $user_id, $exclude_fullname )   X-Ref
Get random field type by user ID.

param: int    $user_id          User ID to query for.
param: string $exclude_fullname SQL portion used to exclude by field ID.
since: 1.0.0
return: array|null|object

get_fullname( $user_id = 0 )   X-Ref
Get fullname for provided user ID.

param: int $user_id ID of the user to query.
since: 1.0.0
return: mixed

Generated: Mon Mar 1 01:01:37 2021 Cross-referenced by PHPXref 0.7.1