Documentation

CRM_Core_BAO_CMSUser
in package

Class CRM_Core_BAO_CMSUser

Table of Contents

Methods

buildForm()  : false|void
Create Form for CMS user using Profile.
create()  : int
Create CMS user using Profile.
formRule()  : array<string|int, mixed>|bool
Checks that there is a valid username & email optionally checks password is present & matches DB & gets the CMS to validate

Methods

buildForm()

Create Form for CMS user using Profile.

public static buildForm(CRM_Core_Form &$form, int $gid, bool $emailPresent[, const|int $action = CRM_Core_Action::NONE ]) : false|void
Parameters
$form : CRM_Core_Form
$gid : int

Id of group of profile.

$emailPresent : bool

True if the profile field has email(primary).

$action : const|int = CRM_Core_Action::NONE
Return values
false|void —

WTF

create()

Create CMS user using Profile.

public static create(array<string|int, mixed> &$params, string $mailParam) : int
Parameters
$params : array<string|int, mixed>
$mailParam : string

Name of the param which contains the email address. Because. Right. OK. That's what it is.

Return values
int —

contact id that has been created

formRule()

Checks that there is a valid username & email optionally checks password is present & matches DB & gets the CMS to validate

public static formRule(array<string|int, mixed> $fields, array<string|int, mixed> $files, CRM_Core_Form $form) : array<string|int, mixed>|bool
Parameters
$fields : array<string|int, mixed>

Posted values of form.

$files : array<string|int, mixed>

Uploaded files if any.

$form : CRM_Core_Form
Return values
array<string|int, mixed>|bool

        
On this page

Search results