Bugzilla – Attachment 71790 Details for
Bug 19936
Move Check_userid and Generate_Userid to Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19936: Remove the subroutine Check_Userid
Bug-19936-Remove-the-subroutine-CheckUserid.patch (text/plain), 2.01 KB, created by
Jonathan Druart
on 2018-02-16 14:34:22 UTC
(
hide
)
Description:
Bug 19936: Remove the subroutine Check_Userid
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-02-16 14:34:22 UTC
Size:
2.01 KB
patch
obsolete
>From fa21ca0d2a196814d6967029983bb49038655f6f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 8 Jan 2018 18:05:29 -0300 >Subject: [PATCH] Bug 19936: Remove the subroutine Check_Userid > >It is no longer in user, we can remove it. >--- > C4/Members.pm | 33 --------------------------------- > 1 file changed, 33 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index ef82ba29b8..c3e5f5b34a 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -89,7 +89,6 @@ BEGIN { > #Check data > push @EXPORT, qw( > &checkuserpassword >- &Check_Userid > &Generate_Userid > &fixup_cardnumber > &checkcardnumber >@@ -466,38 +465,6 @@ sub AddMember { > return $data{borrowernumber}; > } > >-=head2 Check_Userid >- >- my $uniqueness = Check_Userid($userid,$borrowernumber); >- >- $borrowernumber is optional (i.e. it can contain a blank value). If $userid is passed with a blank $borrowernumber variable, the database will be checked for all instances of that userid (i.e. userid=? AND borrowernumber != ''). >- >- If $borrowernumber is provided, the database will be checked for every instance of that userid coupled with a different borrower(number) than the one provided. >- >- return : >- 0 for not unique (i.e. this $userid already exists) >- 1 for unique (i.e. this $userid does not exist, or this $userid/$borrowernumber combination already exists) >- >-=cut >- >-sub Check_Userid { >- my ( $uid, $borrowernumber ) = @_; >- >- return 0 unless ($uid); # userid is a unique column, we should assume NULL is not unique >- >- return 0 if ( $uid eq C4::Context->config('user') ); >- >- my $rs = Koha::Database->new()->schema()->resultset('Borrower'); >- >- my $params; >- $params->{userid} = $uid; >- $params->{borrowernumber} = { '!=' => $borrowernumber } if ($borrowernumber); >- >- my $count = $rs->count( $params ); >- >- return $count ? 0 : 1; >-} >- > =head2 Generate_Userid > > my $newuid = Generate_Userid($borrowernumber, $firstname, $surname); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19936
:
70365
|
70366
|
70367
|
70368
|
70369
|
70370
|
70371
|
70372
|
70373
|
70374
|
71787
|
71788
|
71789
|
71790
|
71791
|
71792
|
71793
|
71794
|
71795
|
71796
|
72129
|
72130
|
72131
|
72132
|
72133
|
72134
|
72135
|
72136
|
72137
|
72138
|
72139
|
72140
|
72141
|
72142
|
72143
|
72144
|
72145
|
72146
|
72147
|
72148
|
72149
|
72150
|
72151
|
72152
|
73630
|
73631
|
73632
|
73633
|
73634
|
73635
|
73636
|
73637
|
73638
|
73639
|
73640
|
73641
|
73963
|
73964
|
73965
|
73966
|
73967
|
73968
|
73969
|
73970
|
73971
|
73972
|
73973
|
73974
|
74071
|
74072
|
74073
|
74074
|
74075
|
74076
|
74077
|
74078
|
74079
|
74080
|
74081
|
74082