mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-06 14:15:40 -04:00
Hide registration form if max registration reached
See https://github.com/FreshRSS/FreshRSS/issues/679
This commit is contained in:
@@ -351,5 +351,8 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
|
||||
* This action gives possibility to a user to create an account.
|
||||
*/
|
||||
public function registerAction() {
|
||||
if (max_registrations_reached()) {
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<div class="prompt">
|
||||
<h1><?php echo _t('gen.auth.login'); ?></h1>
|
||||
|
||||
<a href="<?php echo _url('auth', 'register'); ?>"><?php echo _t('gen.auth.register.ask'); ?></a>
|
||||
<?php if (!max_registrations_reached()) { ?>
|
||||
<a href="<?php echo _url('auth', 'register'); ?>"><?php echo _t('gen.auth.register.ask'); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<form id="crypto-form" method="post" action="<?php echo _url('auth', 'login'); ?>">
|
||||
<div>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
<div class="prompt">
|
||||
<h1><?php echo _t('gen.auth.login'); ?></h1>
|
||||
|
||||
<?php if (!max_registrations_reached()) { ?>
|
||||
<a href="<?php echo _url('auth', 'register'); ?>"><?php echo _t('gen.auth.register.ask'); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<p>
|
||||
<a class="signin btn btn-important" href="<?php echo _url('auth', 'login'); ?>">
|
||||
<?php echo _i('login'); ?> <?php echo _t('gen.auth.login_persona'); ?>
|
||||
|
||||
Reference in New Issue
Block a user