PASTE
PASTE copied to clipboard
[Feature] Ability to disable user registration
Hi,
Thanks once more for PASTE. There is something bothering me though. As far as I can tell, there is no way to control new user registrations. No way to completely disable it and no way to verify registration requests by the administrator. Am I missing something or is this simply not possible? If not, consider it a feature request :)
Hi @pjdevries,
I recently installed PASTE and had the same question. My use case is to use PASTE only as a private pastebin for myself.
As a temporary solution, I turned on require captcha and Email Verification, then edited Configuration > Mail Settings in the admin panel to point to one of my domains with account information that doesn't exist. This will allow new users accounts to be created, but the account verification email will not be sent due to invalid SMTP information. Then occasionally I'll go in and click on delete all unverified accounts.
Not an elegant solution by any stretch, but it should at least cut down on superfluous accounts being created.
Thanx for the suggestion @devnpnet. It definitely is a creative workaround, but somewhat cumbersome, to be honest. Unless there comes a proper solution, I prefer not to use PASTE. But who knows, if I can ever find the time, energy and inspiration, I'll see if I can fix it myself and create a pull request for it. Don't hold your breath though :)
You could edit the file and remove that link. Go to your theme folder and edit header
<li><a href="./?logout"><i class="fa falist fa-sign-out"></i> Logout</a></li>
<?php } else { ?>
<li><a data-target="#signin" data-toggle="modal" href="#">Login</a></li>
<li><a data-target="#signup" data-toggle="modal" href="#">Register</a></li> <-------REMOVE THIS
<?php } ?>
</ul>
</li>
</ul>
<!-- End Top Right -->
Wouldn't be better to remove also the whole if statement block from login.php ?
// Register process
if (isset($_POST['signup'])) {
$username = htmlentities(trim($_POST['username']));
$password = password_hash($_POST['password'], PASSWORD_DEFAULT);
$email = htmlentities(trim($_POST['email']));
$full_name = htmlentities(trim($_POST['full']));
...
best solution though, a proper boolean setting to enable disable the whole feature from admin panel