WIACPSite theme 0.2.0-alpha.92
Türkçe

§5.2

Login, registration and recovery

  • Phase 10.3

These pages are in the auth region. If the theme has authheader.wcp and authfooter.wcp they wrap the page, otherwise header / footer. Shared variables:

  • $csrf
  • $links (login, register — null when registration is closed —, forgot, recovery)
  • $client_assets (css, js): the core form script and style. Core blocks work with these; authheader must load them.
File Main variables
login.wcp $open, $registration_open, $country_block, $action, $social
register.wcp $open, $quick, $types, $type, $country, $age, $action, $started, $honeypot, $blocks, $referral, $social, $social_pending
password-forgot.wcp $mail_ready, $action
password-reset.wcp $valid, $token, $email, $action, $blocks['password_html']
two-factor.wcp $kind, $method, $alternatives, $target, $code_status, $can_recover, $resend, $verify_action, $send_action
recovery.wcp $done, $open, $type, $types, $action
recovery-code.wcp $channel, $action
recovery-cancel.wcp $state (invalid / closed / open), $status, $request (type, time), $action

Core blocks ($blocks): parts whose rules live in the core arrive as ready HTML. The theme places and styles them with {!! $blocks['…_html'] !!} and does not rewrite their content.

  • password_html: password, confirmation, rule indicator and password generator.
  • client_fields_html: identity, contact, address, date of birth and password on full registration.
  • custom_fields_html, agreements_html, marketing_html.

Minimum age ($age)

  • Values: required, min, types, max_date.
  • On quick registration, when required is true the theme shows a name="birth_date" field for the account types in types. The container gets data-for-type; when the type changes the core script hides and disables the field.
  • Age calculation and the registration block are on the server. A theme that hides the field cannot bypass the rule; registration is refused.

Social buttons ($social)

  • Structure: position (above / below) and buttons (name, label, url).
  • Only providers that are enabled and configured in admin arrive. If the list is empty, do not draw the divider either.
  • On login each button is its own form (with CSRF).
  • On registration the buttons submit inside the registration form with formaction and formnovalidate, so account type, agreement consents and date of birth are checked before going to the provider.
  • When $social_pending['needs_birth_date'] is true, ask the client to enter the date and press the same button.

Field names, form addresses, the honeypot field ($honeypot) and _started must not change. Captcha is drawn with site_component('captcha', ['form' => 'client.login']) (or client.register, client.password, client.recovery).

Partials (@include('includes.x')) see the page's data; the caller can also pass variables explicitly: @include('includes.logo', ['logoClass' => 'x']).

Generated together with WIACP 0.2.0-alpha.92 and the default theme 1.22.0.

Scope: site and client panel themes. The admin panel is not themeable.