Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

yacira's avatar

Register users within a open session

Hi! The default auth of Laravel works with registering by the user itself...

I want to make the user register an option only available for a user called Administrator... This one should have the permission to insert new users...

Which is the path I should follow?

0 likes
5 replies
jlrdw's avatar

I do not understand the question, because just register the regular way but have the admin do it in that case.

yacira's avatar

I just want admin to be able to access to the register form... So, that way, Admin can register all new users..

jlrdw's avatar

Then give just admin access to that page.

yacira's avatar

But I see that, when a user is registered (created and saved into database), then it logins automatically... I want the Admin to keep as the current session and the register becomes in just create and save

Snapey's avatar

An administrator just creates User models (basic CRUD operations)

They SHOULD NOT follow the 'register' path

As for restricting access thats just simple authorization

Please or to participate in this conversation.