Bug 22544: Move get_opac_new to Koha namespace
[srvgit] / opac / opac-memberentry.pl
index dbfd6f8..c9a4790 100755 (executable)
@@ -44,7 +44,7 @@ use Koha::Patron::Modification;
 use Koha::Patron::Modifications;
 use Koha::Patron::Categories;
 use Koha::Token;
-
+use Koha::AuthorisedValues;
 my $cgi = CGI->new;
 my $dbh = C4::Context->dbh;
 
@@ -107,8 +107,7 @@ my $conflicting_attribute = 0;
 
 foreach my $attr (@$attributes) {
     my $attribute = Koha::Patron::Attribute->new($attr);
-    eval {$attribute->check_unique_id};
-    if ( $@ ) {
+    if ( !$attribute->unique_ok ) {
         my $attr_type = Koha::Patron::Attribute::Types->find($attr->{code});
         $template->param(
             extended_unique_id_failed_code => $attr->{code},