[Koha-bugs] [Bug 1861] Unique patrons logins not (totally) enforced
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Dec 30 09:53:01 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=1861
Jonathan Druart <jonathan.druart at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34821|0 |1
is obsolete| |
--- Comment #30 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 34822
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34822&action=edit
Bug 1861 [SIGNED OFF]: There is a problem introduced with an earlier patch, on
this patchset
- $data{'userid'} = Generate_Userid($data{'borrowernumber'},
$data{'firstname'}, $data{'surname'}) if $data{'userid'} eq '';
+ $data{'userid'} = Generate_Userid( $data{'borrowernumber'},
$data{'firstname'}, $data{'surname'} )
+ if ( $data{'userid'} eq '' || Check_Userid( $data{'userid'} ) );
Check_Userid returns 1 if it is unique. So this means unique userids
will always be discarded and new ones created.
This is why all the tests depending on a userid are now failing
To test
1/ run perl t/db_dependent/Serials_2.t
2/ Notice lots of tests fail
3/ OR Add a borrower with a userid set, notice the userid is ignored
and one is generated instead
4/ Apply patch
5/ Add a new borrower, notice the userid sticks (if it is unique)
6/ Run perl t/db_dependent/Serials_2.t notice tests pass
7/ Run perl t/db_dependent/Members.t notice tests still pass
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart at biblibre.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list