rainlab/user-plugin
RainLab User Plugin adds complete front-end user management to October CMS: registration, login, password reset, profile editing, and user groups with permissions. Drop-in components and a ready-made account page make secure authentication quick to wire into any theme.
composer require rainlab/user-plugin
php artisan october:up # runs the new migration automatically
The v3.7 migration is applied on upgrade with no manual steps, and both new activation policies default to off, so an existing site behaves exactly as before until you opt in.
Where to look first:
First use case — a headless registration endpoint: enable require admin approval, then replace a form handler with ActionManager:
use RainLab\User\Classes\ActionManager; // verify exact namespace in the plugin's classes/ dir
$user = ActionManager::instance()->registerUser([
'first_name' => 'Some',
'email' => '[email protected]',
'password' => 'ChangeMe888',
]);
The user lands in the pending state, the normal rainlab.user.register event fires, and an admin approves from the backend — no component logic duplicated in your API layer.
ActionManager as the single workflow entry point. Every user flow (registration, sign-in, password recovery, profile update) is exposed, so a REST/GraphQL controller becomes a thin translation layer:
public function store(Request $request)
{
try {
$user = ActionManager::instance()->registerUser($request->only([
'first_name', 'last_name', 'email', 'password',
]));
return response()->json(['id' => $user->id], 201);
} catch (ValidationException $e) {
return response()->json(['errors' => $e->errors()], 422);
}
}
Because policies are enforced at sign-in, the same rules cover browser logins and API logins — you do not need a separate approval check in your controller.
Pending-state UX via the redirect property. The redirect property is back on the Authentication and Registration components. Use it to send pending users to a "your account is awaiting approval" page instead of leaving them on a generic error, and to post-login route API-driven users to the right place.
External app URLs for recovery/verification. Point password-reset and email-verification links at your SPA or mobile deep link. All customary events keep firing, so existing listeners for rainlab.user.register, activation, and password reset continue to work.
Import/export as an onboarding tool. Import supports email matching to update existing users, automatic group creation, and group assignment — useful for migrating from another platform or bulk-provisioning a client's team. Export deliberately omits password hashes and secrets, so it is safe to hand to a client (still review for PII/compliance).
Presence via rainlab.user.seen. New event for "came online". Use a queued listener to flip an is_online flag or push to a dashboard rather than doing synchronous writes in the request cycle.
Tailor fields. Custom user fields now honor tab and span, so you can group profile fields into logical tabs in the backend form without a custom form definition.
email_verified_at (or run a one-off verification) before flipping the switch.ActionManager::instance() is a singleton. Treat it as stateless per request; don't stash component or request state on it between calls.ValidationException to 422 — otherwise headless clients get a 500.redirect returning can surprise you. An empty or malformed value may fall back to the default landing page; set it explicitly per component instance rather than globally.rainlab.user.seen fires per online transition, which on a busy site is frequent. Throttle or queue the listener; avoid heavy queries there.storage/logs and run php artisan october:up after deployment to confirm the migration.tab/span affect backend form layout only — they do not change frontend rendering or validation.How can I help you explore Laravel packages today?