09-20-2017, 11:27 AM
Hi and welcome!
We never overwrite the index.php. Once you install UserSpice, it's yours. If you need to modify anything in the users folder, let me know, because there are specific ways to do that.
I don't have a setting to disable registration, but you could do this.
Go in the usersc folder and create a file called join.php and put this in it.
<?php
require_once "../users/init.php";
Redirect::to("index.php?err=We+are+sorry,+but+registration+is+closed.");
?>
I can work on adding that to UserSpice 4.3. It's an interesting idea that I never thought about. Just FYI, if you do this and have social logins turned on if someone who was not a user of your site tries to login via google or facebook, their account will automatically be created.
If I want to have to "approve" each user, I usually add a 3rd permission level in the admin dashboard called "staff" or something like that. Then I require all the pages of my project that I create to have a permission level of staff. The reason for this is that when a user creates an account, they're automatically given the permission level of "user", but if you need "staff" before you can do anything important, then all someone can do is basically login/logout until you tell them otherwise. Just another thought.
We never overwrite the index.php. Once you install UserSpice, it's yours. If you need to modify anything in the users folder, let me know, because there are specific ways to do that.
I don't have a setting to disable registration, but you could do this.
Go in the usersc folder and create a file called join.php and put this in it.
<?php
require_once "../users/init.php";
Redirect::to("index.php?err=We+are+sorry,+but+registration+is+closed.");
?>
I can work on adding that to UserSpice 4.3. It's an interesting idea that I never thought about. Just FYI, if you do this and have social logins turned on if someone who was not a user of your site tries to login via google or facebook, their account will automatically be created.
If I want to have to "approve" each user, I usually add a 3rd permission level in the admin dashboard called "staff" or something like that. Then I require all the pages of my project that I create to have a permission level of staff. The reason for this is that when a user creates an account, they're automatically given the permission level of "user", but if you need "staff" before you can do anything important, then all someone can do is basically login/logout until you tell them otherwise. Just another thought.