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
Afficher le fichier Open project: vanilla/vanilla

Méthodes publiques

Свойство 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.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
updateUserFields ( $UserID, $Fields ) Update user with new profile fields.

Private Methods

Méthode 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 méthode

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

base_getAppSettingsMenuItems_handler() public méthode

Add the Dashboard menu item.

base_render_before() public méthode

public base_render_before ( $sender )

entryController_registerBeforePassword_handler() public méthode

Add non-checkbox fields to registration forms.

entryController_registerFormBeforeTerms_handler() public méthode

Add checkbox fields to registration forms.

entryController_registerValidation_handler() public méthode

Required fields on registration forms.

parseSpecialFields() public méthode

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

profileController_editMyAccountAfter_handler() public méthode

Add fields to edit profile form.

settingsController_profileExtender_create() public méthode

Settings page.

settingsController_profileFieldAddEdit_create() public méthode

Add/edit a field.

settingsController_profileFieldDelete_create() public méthode

Delete a field.

setup() public méthode

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

updateUserFields() protected méthode

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

userController_afterFormInputs_handler() public méthode

Display custom fields on Edit User form.

userInfoModule_onBasicInfo_handler() public méthode

Display custom fields on Profile.

userModel_afterInsertUser_handler() public méthode

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

userModel_afterSave_handler() public méthode

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

utilityController_exportProfiles_create() public méthode

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
Résultat array

$ProfileFields public_oe property

public array $ProfileFields
Résultat array

$ReservedNames public_oe property

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