[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

BuddyPress XProfile Classes.

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

Defines 1 class

BP_XProfile_ProfileData:: (16 methods):
  __construct()
  populate()
  exists()
  is_valid_field()
  save()
  delete()
  get_data_for_user()
  get_all_for_user()
  get_fielddataid_byid()
  get_value_byid()
  get_value_byfieldname()
  delete_for_field()
  get_last_updated()
  delete_data_for_user()
  get_random()
  get_fullname()


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.

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

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

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

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.

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

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

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

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

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

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

Supports multiple user IDs.

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

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

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

delete_for_field( $field_id )   X-Ref
Delete field.

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

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

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

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

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

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

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

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

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



Generated: Sat Sep 21 01:01:46 2019 Cross-referenced by PHPXref 0.7.1