LP#707167 Make open-ils.actor.usrname.exists not ignore deleted users
authorMichael Peters <mrpeters@library.in.gov>
Fri, 16 Mar 2012 17:56:57 +0000 (13:56 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 20 Mar 2012 17:33:19 +0000 (13:33 -0400)
Currently, open-ils.actor.usrname.exists filters out deleted users.  This
results in a user recieving indication as to why a user update
failed, when the reason is the username they're attempting to use
is in use, but is "deleted" in the database.

This branch makes open-ils.actor.usrname.exists look at deleted users
since they still prevent re-use of the delted user's username.

More information is in the original bug, https://bugs.launchpad.net/evergreen/+bug/707167.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm

index 3fa922c..1599d30 100644 (file)
@@ -2664,7 +2664,7 @@ sub usrname_exists {
        my( $self, $conn, $auth, $usrname ) = @_;
        my $e = new_editor(authtoken=>$auth);
        return $e->event unless $e->checkauth;
-       my $a = $e->search_actor_user({usrname => $usrname, deleted=>'f'}, {idlist=>1});
+       my $a = $e->search_actor_user({usrname => $usrname}, {idlist=>1});
        return $$a[0] if $a and @$a;
        return undef;
 }