PHP Class ProfileExtenderPlugin, vanilla

If the field name is an existing column on user table (e.g. Title, About, Location) it will store there. Otherwise, it stores in UserMeta.
Inheritance: extends Gdn_Plugin
Datei anzeigen Open project: vanilla/vanilla

Public Properties

Property Type Description
$FieldProperties Whitelist of allowed field properties.
$FormTypes Available form field types in format Gdn_Type => DisplayName.
$MagicLabels array
$ProfileFields array
$ReservedNames Prevents accidental or malicious overwrite of sensitive fields.

Public Methods

Method Description
base_AuthorInfo_handler ( $Sender, $Args ) Add custom fields to discussions.
base_getAppSettingsMenuItems_handler ( $Sender ) Add the Dashboard menu item.
base_render_before ( $sender )
entryController_registerBeforePassword_handler ( $Sender ) Add non-checkbox fields to registration forms.
entryController_registerFormBeforeTerms_handler ( $Sender ) Add checkbox fields to registration forms.
entryController_registerValidation_handler ( $Sender ) Required fields on registration forms.
parseSpecialFields ( $Fields = [] ) Special manipulations.
profileController_editMyAccountAfter_handler ( $Sender ) Add fields to edit profile form.
settingsController_profileExtender_create ( $Sender ) Settings page.
settingsController_profileFieldAddEdit_create ( $Sender, $Args ) Add/edit a field.
settingsController_profileFieldDelete_create ( $Sender, $Args ) Delete a field.
setup ( ) Import from CustomProfileFields or upgrade from ProfileExtender 2.0.
userController_afterFormInputs_handler ( $Sender ) Display custom fields on Edit User form.
userInfoModule_onBasicInfo_handler ( $Sender ) Display custom fields on Profile.
userModel_afterInsertUser_handler ( $Sender, $Args ) Save custom profile fields on registration.
userModel_afterSave_handler ( $Sender, $Args ) Save custom profile fields when saving the user.
utilityController_exportProfiles_create ( $sender ) Endpoint to export basic user data along with all custom fields into CSV.

Protected Methods

Method Description
updateUserFields ( $UserID, $Fields ) Update user with new profile fields.

Private Methods

Method Description
getProfileField ( $Name ) : array Get data for a single profile field.
getProfileFields ( ) : array Get custom profile fields.
profileFields ( $Sender ) Display custom profile fields on form.

Method Details

base_AuthorInfo_handler() public method

Add custom fields to discussions.
public base_AuthorInfo_handler ( $Sender, $Args )

base_getAppSettingsMenuItems_handler() public method

Add the Dashboard menu item.

base_render_before() public method

public base_render_before ( $sender )

entryController_registerBeforePassword_handler() public method

Add non-checkbox fields to registration forms.

entryController_registerFormBeforeTerms_handler() public method

Add checkbox fields to registration forms.

entryController_registerValidation_handler() public method

Required fields on registration forms.

parseSpecialFields() public method

Special manipulations.
public parseSpecialFields ( $Fields = [] )

profileController_editMyAccountAfter_handler() public method

Add fields to edit profile form.

settingsController_profileExtender_create() public method

Settings page.

settingsController_profileFieldAddEdit_create() public method

Add/edit a field.

settingsController_profileFieldDelete_create() public method

Delete a field.

setup() public method

Import from CustomProfileFields or upgrade from ProfileExtender 2.0.
public setup ( )

updateUserFields() protected method

Update user with new profile fields.
protected updateUserFields ( $UserID, $Fields )
$UserID int
$Fields array

userController_afterFormInputs_handler() public method

Display custom fields on Edit User form.

userInfoModule_onBasicInfo_handler() public method

Display custom fields on Profile.

userModel_afterInsertUser_handler() public method

Save custom profile fields on registration.
public userModel_afterInsertUser_handler ( $Sender, $Args )
$Sender object
$Args array

userModel_afterSave_handler() public method

Save custom profile fields when saving the user.
public userModel_afterSave_handler ( $Sender, $Args )
$Sender object
$Args array

utilityController_exportProfiles_create() public method

Endpoint to export basic user data along with all custom fields into CSV.

Property Details

$FieldProperties public_oe property

Whitelist of allowed field properties.
public $FieldProperties

$FormTypes public_oe property

Available form field types in format Gdn_Type => DisplayName.
public $FormTypes

$MagicLabels public_oe property

public array $MagicLabels
return array

$ProfileFields public_oe property

public array $ProfileFields
return array

$ReservedNames public_oe property

Prevents accidental or malicious overwrite of sensitive fields.
public $ReservedNames