Skip to content

Commit

Permalink
Merge pull request #265 from Libki/issue_264
Browse files Browse the repository at this point in the history
Add ability to specify if personal names in SIP come in reserse order…
  • Loading branch information
kylemhall authored Jan 12, 2023
2 parents dcc8668 + 69608f9 commit 1c0fc43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Libki/SIP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ sub authenticate_via_sip {
= split( $c->config->{SIP}->{pattern_personal_name}, $sip_fields->{AE} );
$lastname =~ s/^\s+//;
$firstname =~ s/^\s+//;
( $lastname, $firstname ) = ( $firstname, $lastname ) if $c->config->{SIP}->{pattern_personal_name_reverse};

my $category = $sip_fields->{ $c->config->{SIP}->{category_field} };
$c->add_user_category($category) if $category;

Expand Down
1 change: 1 addition & 0 deletions libki_local.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
# Leave EXPIRED_CARD unchanged
category_field PC # Category field in SIP response
pattern_personal_name , # Pattern for spliting lastname et firstname in personal name field(AE) in SIP response
pattern_personal_name_reverse: 1 # If the names are ordered firstname then lastname, enable this option
ILS Koha # Options are currently 'Koha' and 'Evergreen', defaults to Koha behavior
</SIP>

0 comments on commit 1c0fc43

Please sign in to comment.