Bug 28947: Prevent OPAC user to create new users
This patch prevents an existing user from exploiting the patron edit form in order to force create new patrons To test: Try all combinations of PatronSelfRegistration and PatronSelfRegistrationVerifyByEmail with and without this patch. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> (cherry picked from commit eab5f18787d5b7b5efc374a7dc87ef4090e5bac0) Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
parent
c4100c48a8
commit
d747bc36b5
|
|
@ -63,6 +63,11 @@ unless ( C4::Context->preference('PatronSelfRegistration') || $borrowernumber )
|
|||
}
|
||||
|
||||
my $action = $cgi->param('action') || q{};
|
||||
if ( $borrowernumber && ( $action eq 'create' || $action eq 'new' ) ) {
|
||||
print $cgi->redirect("/cgi-bin/koha/opac-main.pl");
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $action eq q{} ) {
|
||||
if ($borrowernumber) {
|
||||
$action = 'edit';
|
||||
|
|
|
|||
Loading…
Reference in New Issue