Lines 311-324
if ($op eq 'save' || $op eq 'insert'){
Link Here
|
311 |
$newdata{'surname'} = uc($newdata{'surname'}); |
311 |
$newdata{'surname'} = uc($newdata{'surname'}); |
312 |
} |
312 |
} |
313 |
|
313 |
|
314 |
if (C4::Context->preference("IndependentBranches")) { |
314 |
if ( C4::Context->preference("IndependentBranches") ) { |
315 |
unless ( C4::Context->IsSuperLibrarian() ){ |
315 |
unless ( C4::Context->IsSuperLibrarian() ) { |
316 |
$debug and print STDERR " $newdata{'branchcode'} : ".$userenv->{flags}.":".$userenv->{branch}; |
316 |
$debug && warn " $newdata{'branchcode'} : " . $userenv->{flags} . ":" . $userenv->{branch}; |
317 |
unless (!$newdata{'branchcode'} || $userenv->{branch} eq $newdata{'branchcode'}){ |
317 |
|
318 |
push @errors, "ERROR_branch"; |
318 |
unless ( |
319 |
} |
319 |
!$newdata{'branchcode'} |
|
|
320 |
|| GetIndependentGroupModificationRights( |
321 |
{ for => $newdata{'branchcode'} } |
322 |
) |
323 |
) |
324 |
{ |
325 |
push @errors, "ERROR_branch"; |
326 |
} |
320 |
} |
327 |
} |
321 |
} |
328 |
} |
|
|
329 |
|
322 |
# Check if the userid is unique |
330 |
# Check if the userid is unique |
323 |
unless (Check_Userid($newdata{'userid'},$borrowernumber)) { |
331 |
unless (Check_Userid($newdata{'userid'},$borrowernumber)) { |
324 |
push @errors, "ERROR_login_exist"; |
332 |
push @errors, "ERROR_login_exist"; |
Lines 447-456
if ($nok or !$nodouble){
Link Here
|
447 |
$template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1); |
455 |
$template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1); |
448 |
} |
456 |
} |
449 |
} |
457 |
} |
450 |
if (C4::Context->preference("IndependentBranches")) { |
458 |
if ( C4::Context->preference("IndependentBranches") ) { |
451 |
my $userenv = C4::Context->userenv; |
459 |
my $userenv = C4::Context->userenv; |
452 |
if ( !C4::Context->IsSuperLibrarian() && $data{'branchcode'} ) { |
460 |
if ( !C4::Context->IsSuperLibrarian() && $data{'branchcode'} ) { |
453 |
unless ($userenv->{branch} eq $data{'branchcode'}){ |
461 |
unless ( |
|
|
462 |
GetIndependentGroupModificationRights( |
463 |
{ for => $data{'branchcode'} } |
464 |
) |
465 |
) |
466 |
{ |
454 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
467 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
455 |
exit; |
468 |
exit; |
456 |
} |
469 |
} |
457 |
- |
|
|