Limiting the number of Members or Users in Umbraco Database
I have two questions:
Is there a way that I can limit the number of Users in the Umbraco backend?
Is there a way that I can limit the number of Members in the Umbraco backend?
Essentially, want I want is for the system to automatically disallow more Members or Users to be added once a certain number is reached in the database.
If you really need this feature, you could subscribe to the BeforeNodeRender/AfterNodeRender event to remove the create user/member from the context menu in case the number of users/members has exceeded a certain number.
So, what exactly is automated? If you remove the items from the context menu, isn't that automated enough? Anyway, maybe an even better solution (which will work in both back- end frontend for limiting) is to build your own membership provider for members/users (can inherit from the umbraco providers) and override the CreateUser() method, and do not create users/members if number has exceeded a predefined number.
Limiting the number of Members or Users in Umbraco Database
I have two questions:
Essentially, want I want is for the system to automatically disallow more Members or Users to be added once a certain number is reached in the database.
Cheers,
JV
If you really need this feature, you could subscribe to the BeforeNodeRender/AfterNodeRender event to remove the create user/member from the context menu in case the number of users/members has exceeded a certain number.
References and sample code: http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events and http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events and http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples
Cheers,
/Dirk
Thanks Dirk,
There's some really good ideas amongst those examples. But I'm looking for something automated.
Where I can limit the number of Members who register to the website. i.e. 100, 300, 500, etc.
The same for the Users as well, but this might not be as simple as the Member limitation.
Does anyone have any ideas?
Cheers,
JV
So, what exactly is automated? If you remove the items from the context menu, isn't that automated enough? Anyway, maybe an even better solution (which will work in both back- end frontend for limiting) is to build your own membership provider for members/users (can inherit from the umbraco providers) and override the CreateUser() method, and do not create users/members if number has exceeded a predefined number.
Cheers,
/Dirk
is working on a reply...