\Blackpulp\MinistryPlatformUser

This class handles user-specific interactions.

Summary

Methods
Properties
Constants
__construct()
setUserInfoFromGuid()
getId()
getUserName()
getContactId()
getDisplayName()
getEmail()
getImpersonate()
getRoles()
getInfo()
getFormattedTableData()
No public properties found
No constants found
setSecurityRoles()
setInfo()
$id
$username
$display_name
$contact_id
$user_guid
$email
$impersonate
$info
$roles
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

User_ID

Type

integer

$username

$username : string

Username

Type

string

$display_name

$display_name : string

Display Name

Type

string

$contact_id

$contact_id : integer

Contact_ID

Type

integer

$user_guid

$user_guid : string

User_GUID

Type

string

$email

$email : string

Email_Address

Type

string

$impersonate

$impersonate : boolean

Whether the user is allowed to impersonate other Platform users.

Type

boolean

$roles

$roles : array

All security roles for the authenticated user

Type

array

Methods

__construct()

__construct(\SimpleXMLElement  $user, string  $username = "", string  $user_guid = "") : void

Create the User object

Parameters

\SimpleXMLElement $user

Response from MP Authenticate method

string $username

If the MP AuthenticateUser() API call was used, the username must be supplied.

string $user_guid

If the MP AuthenticateGUIDs() API call was used, the guid must be supplied instead.

setUserInfoFromGuid()

setUserInfoFromGuid() 

getId()

getId() : integer

Get the user's User ID

Returns

integer

getUserName()

getUserName() : string

Get the user's Username

Returns

string

getContactId()

getContactId() : integer

Get the user's Contact ID

Returns

integer

getDisplayName()

getDisplayName() : string

Get the user's Display Name

Returns

string

getEmail()

getEmail() : string

Get the user's E-mail Address

Returns

string

getImpersonate()

getImpersonate() : boolean

Get whether the user can impersonate other Platform users

Returns

boolean

getRoles()

getRoles() : array

Get the user's Security Roles

Returns

array

getInfo()

getInfo() : \Blackpulp\MinistryPlatform\StoredProcedureResult

Get contact and user info about the user.

Also returns lookup tables for Genders, Marital Statuses, Prefixes, and Suffixes.

Returns

\Blackpulp\MinistryPlatform\StoredProcedureResult

getFormattedTableData()

getFormattedTableData() : array

Takes getInfo() and turns lookup arrays into Key-Value pairs.

Returns

array

setSecurityRoles()

setSecurityRoles() : self

Sets security roles

Returns

self

setInfo()

setInfo() : self

Setter for the user info

Returns

self