Voyti
User management, authentication & authorization
Configuration
Override Voyti params in your app’s params.php:
use YiiRocks\Voyti\Enum\ProfileVisibility;
return [
'yiirocks/voyti' => [
'appName' => 'My Project',
'profileVisibility' => ProfileVisibility::PUBLIC,
],
];General
appName string
'Voyti'Application name - used as the
{app} placeholder in mail subjects and as the TOTP issuer by the optional TOTP method package (yiirocks/voyti-2fa-totp).homeRoute string
'home'Route to redirect to after a successful login (password, 2FA, or social) or logout. Must be a route registered by the host app - an unregistered route name throws a
LogicException naming the misconfigured option, rather than a bare router exception.Authentication & Registration
enableRegistration bool
trueAllow new user registration.
enableEmailConfirmation bool
trueRequire email confirmation.
allowPasswordRecovery bool
trueAllow password recovery.
allowAdminPasswordRecovery bool
falseAllow admin-initiated password recovery.
allowAccountDelete bool
falseAllow users to delete their account. Gates the Privacy hub's delete-account link/route alongside
privacyMenuItems below - GDPR data export and anonymization live in the separate yiirocks/voyti-gdpr package, with their own config.emailChangeConfirmation EmailChangeConfirmation
EmailChangeConfirmation::NEWNONE (change immediately), NEW (confirm new address only), or BOTH (confirm both old and new addresses).rememberLoginLifespan int
2592000Remember-me cookie lifetime and idle auth timeout in seconds.
tokenConfirmationLifespan int
86400Confirmation token validity.
tokenRecoveryLifespan int
21600Recovery token validity.
enableSwitchIdentities bool
trueAllow admin to switch user identities.
mailAdminOnRegister ?string
nullEmail notified on new registration.
recaptchaVersion RecaptchaVersion
RecaptchaVersion::V3RecaptchaVersion::V2 or RecaptchaVersion::V3. Requires the optional yiirocks/recaptcha package plus a site key and secret configured for the selected version via that package's own RecaptchaRegistry::configure() - without it, forms silently render and validate without reCAPTCHA.Session & Security
maxPasswordAge int
0Max password age in days before a user is forced to set a new one.
0 disables password expiration entirely.enablePasswordComplexity bool
falseRequire passwords to contain an uppercase letter, a lowercase letter, a digit, and a special character.
passwordHistoryLimit int
10Number of previous passwords remembered per user to prevent reuse. Only enforced when
maxPasswordAge is greater than 0.administratorPermissionName string
'voyti-admin'Permission name granting admin access.
profileVisibility ProfileVisibility
ProfileVisibility::USERSProfile visibility:
OWNER = owner only, ADMIN = owner + admins, USERS = any authenticated user, PUBLIC = public.enableAuditLog bool
trueRecord admin actions (RBAC and user management changes) to the
user_audit_log table, viewable at admin/audit-log/.rememberMeCookieDomain ?string
nullDomain attribute for the remember-me cookie, e.g.
'.example.com', letting a login on one subdomain (app.example.com) carry over to others (admin.example.com) that share the same root domain. Leave null to scope the cookie to the exact host it was issued on.Views & Mail
viewPath ?string
nullOptional custom directory for web template overrides. When a template is not found here, falls back to the first installed views package's bundled views, announced via the
viewsPackagePaths param (populated by the views package itself).mailPath string
VoytiConfig::DEFAULT_MAIL_PATHBase path for mail templates. If a template is not found here, falls back to the default mail templates.
Admin Dashboard
enableRecommendations bool
trueShow recommended sibling Voyti packages (REST API, GDPR, social authentication, two-factor auth) in the admin dashboard when they are not already installed. Set to
false to disable package recommendations entirely.