WebVIEP Plugin

RegistrationRoleSelector

Table of Contents

Methods

assignRole()  : void
Assign chosen WebVIEP role after successful registration.
register()  : void
Hook registration UI/validation/assignments.
renderRoleField()  : void
Render select field for WebVIEP roles.
validateRole()  : WP_Error
Validate role selection on registration.
webviepRoles()  : array<string, array<string|int, mixed>>
Return editable WebVIEP roles (excluding admin).

Methods

assignRole()

Assign chosen WebVIEP role after successful registration.

public static assignRole(int $userId) : void
Parameters
$userId : int

WordPress user ID.

validateRole()

Validate role selection on registration.

public static validateRole(WP_Error $errors, string $sanitized_user_login, string $user_email) : WP_Error
Parameters
$errors : WP_Error

Existing errors.

$sanitized_user_login : string

Username.

$user_email : string

Email.

Return values
WP_Error

webviepRoles()

Return editable WebVIEP roles (excluding admin).

private static webviepRoles() : array<string, array<string|int, mixed>>
Return values
array<string, array<string|int, mixed>>

        
On this page

Search results