[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

BuddyPress XProfile Classes.

File Size: 780 lines (22 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.

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, $field_type_objects = array()   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.
param: array $field_type_objects Array of field type objects keyed by the queried filed IDs.
since: 2.0.0
since: 8.0.0 Checks if a null field data is an xProfile WP Field.
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
since: 8.0.0 Checks if a null field data is an xProfile WP Field.
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
since: 8.0.0 Checks if a null field data is an xProfile WP Field.
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: Sun Dec 22 01:00:54 2024 Cross-referenced by PHPXref 0.7.1