Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Ability to disable user registration #136

Open
pjdevries opened this issue Oct 22, 2020 · 4 comments
Open

[Feature] Ability to disable user registration #136

pjdevries opened this issue Oct 22, 2020 · 4 comments

Comments

@pjdevries
Copy link

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 :)

@devnpnet
Copy link

devnpnet commented Feb 7, 2021

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.

@pjdevries
Copy link
Author

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 :)

@imwireless
Copy link

imwireless commented Feb 18, 2021

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 -->

@Gregory-K
Copy link

Gregory-K commented Feb 27, 2021

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

@thinkverse thinkverse changed the title New user registration control [Feature] Ability to disable user registration Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants