Skip to content

User Provisioning

User provisioning allows administrators to create WordPress user accounts directly from person records, establishing a bidirectional link between the person and the WP user.

When an administrator provisions a user account for a person:

  1. A WordPress user is created with the Rondo User role
  2. The person record is linked to the WP user (and vice versa)
  3. The member’s KNVB ID is stored on the WP user
  4. A configurable welcome email can be sent with login instructions

Provisioning creates a bidirectional link between person records and WordPress users:

StorageMeta KeyValue
Person post meta_rondo_wp_user_idWordPress user ID
WP user metarondo_linked_person_idPerson post ID
WP user meta_rondo_knvb_idKNVB member ID

This linking enables:

  • Showing the linked user account on person detail pages (AccountCard component)
  • Showing the linked person name in the WordPress users list
  • Cross-referencing between member data and user accounts

POST /rondo/v1/people/{person_id}/provision

Creates a WordPress user account for the specified person and links them.

Permission: Admin only

Response:

{
"success": true,
"user_id": 42,
"person_id": 789,
"welcome_email_sent": true
}

GET /rondo/v1/provisioning/settings

Returns current provisioning settings including the welcome email template.

Permission: Admin only

Response:

{
"welcome_email_subject": "Welkom bij Rondo",
"welcome_email_body": "Beste {{naam}},\n\nJe account is aangemaakt...",
"auto_send_welcome_email": true
}

POST /rondo/v1/provisioning/settings

Update provisioning settings.

Permission: Admin only

Body:

{
"welcome_email_subject": "Welkom bij Rondo",
"welcome_email_body": "Beste {{naam}},\n\nJe account is aangemaakt...",
"auto_send_welcome_email": true
}

When retrieving a person via the REST API, provisioning-related fields are included:

FieldTypeDescription
linked_user_idint|nullWordPress user ID linked to this person
welcome_email_sent_atstring|nullISO timestamp of when the welcome email was sent

The WordPress users list includes additional fields for linked persons:

FieldTypeDescription
linked_person_idint|nullPerson post ID linked to this user
linked_person_namestring|nullDisplay name of the linked person

The welcome email template is configurable in Settings > Beheer > Welkomstmail tab (WelkomstmailTab component).

Available template variables:

VariableDescription
{{naam}}Person’s full name
{{voornaam}}Person’s first name
{{email}}Person’s email address
{{site_url}}URL of the Rondo Club site

Administrators can also manually trigger or resend the welcome email from the AccountCard component on a person’s detail page.

The AccountCard component is displayed on person detail pages for administrators. It shows:

  • Whether the person has a linked WordPress user account
  • The linked user’s email and role
  • Button to provision a new account (if no linked user)
  • Button to send/resend the welcome email
  • Timestamp of when the welcome email was last sent

Class: Rondo\Users\UserProvisioning

MethodDescription
provision( $person_id )Create WP user and link to person
send_welcome_email( $user_id )Send the welcome email to a provisioned user
get_settings()Get current provisioning settings
update_settings( $settings )Update provisioning settings