0

I want to disable user sign up, but still provide edit profile functionality for existing users. Is this possible?

Currently, removing :registerable from th options list also disables the edit profile functionality and edit_user_registration_path is no longer defined.

Any way around this? It is strange that seemingly unrelated functionality is coupled this way.

aaandre
  • 2,502
  • 5
  • 33
  • 46

1 Answers1

1

What I would do would be to create a registration controller and use devise mappings to use that new registration controller. Then for the new and create actions set a flash message and redirect to the root of the app (or your chosen location). If you want to lock it down even more, just override the create method on your user model and throw an exception.

See this answer- disabling Devise registration for production environment only

Community
  • 1
  • 1
Brandon Hansen
  • 197
  • 1
  • 1
  • 8