Lines 316-329
if ($op eq 'save' || $op eq 'insert'){
Link Here
|
316 |
$newdata{'surname'} = uc($newdata{'surname'}); |
316 |
$newdata{'surname'} = uc($newdata{'surname'}); |
317 |
} |
317 |
} |
318 |
|
318 |
|
319 |
if (C4::Context->preference("IndependentBranches")) { |
319 |
if ( C4::Context->preference("IndependentBranches") ) { |
320 |
unless ( C4::Context->IsSuperLibrarian() ){ |
320 |
unless ( C4::Context->IsSuperLibrarian() ) { |
321 |
$debug and print STDERR " $newdata{'branchcode'} : ".$userenv->{flags}.":".$userenv->{branch}; |
321 |
$debug && warn " $newdata{'branchcode'} : " . $userenv->{flags} . ":" . $userenv->{branch}; |
322 |
unless (!$newdata{'branchcode'} || $userenv->{branch} eq $newdata{'branchcode'}){ |
322 |
|
323 |
push @errors, "ERROR_branch"; |
323 |
unless ( |
324 |
} |
324 |
!$newdata{'branchcode'} |
|
|
325 |
|| GetIndependentGroupModificationRights( |
326 |
{ for => $newdata{'branchcode'} } |
327 |
) |
328 |
) |
329 |
{ |
330 |
push @errors, "ERROR_branch"; |
331 |
} |
325 |
} |
332 |
} |
326 |
} |
333 |
} |
|
|
334 |
|
327 |
# Check if the userid is unique |
335 |
# Check if the userid is unique |
328 |
unless (Check_Userid($newdata{'userid'},$borrowernumber)) { |
336 |
unless (Check_Userid($newdata{'userid'},$borrowernumber)) { |
329 |
push @errors, "ERROR_login_exist"; |
337 |
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 |
- |
|
|