patch against RT #51505
Peter Karman [Sat, 3 Apr 2010 02:57:52 +0000 (02:57 +0000)]
Changes
lib/Catalyst/Authentication/Store/LDAP.pm
lib/Catalyst/Authentication/Store/LDAP/Backend.pm
lib/Catalyst/Authentication/Store/LDAP/User.pm

diff --git a/Changes b/Changes
index d8aa7d9..e1234ba 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,9 +1,14 @@
-0.1007  19 Mar 2010
+1.008  xxx
+   - Allow for multiple uid values on a User object. See RT
+     https://rt.cpan.org/Ticket/Display.html?id=51505
+     and patch from Andrew Kirkpatrick.
+
+1.007  19 Mar 2010
    - Store the user password for the ldap_connection method in an inside
      out hash rather than a closure so that the user object can be serialized
      with Storable as people are putting them in the session (RT#53279)
 
-0.1006  11 Dec 2009
+1.006  11 Dec 2009
    - Pass $c along to find_user method so overridden user_class users can
      get at models (or whatever crazy things they might do) (gphat)
    - Add an ldap_connection method to the user class, which will return
index b6c5517..60aef5a 100644 (file)
@@ -3,7 +3,7 @@ package Catalyst::Authentication::Store::LDAP;
 use strict;
 use warnings;
 
-our $VERSION = '1.007';
+our $VERSION = '1.008';
 
 use Catalyst::Authentication::Store::LDAP::Backend;
 
index 9c97753..1fdf22d 100644 (file)
@@ -72,7 +72,7 @@ use base qw( Class::Accessor::Fast );
 use strict;
 use warnings;
 
-our $VERSION = '1.007';
+our $VERSION = '1.008';
 
 use Catalyst::Authentication::Store::LDAP::User;
 use Net::LDAP;
index da6b885..d7339b3 100644 (file)
@@ -50,7 +50,7 @@ use strict;
 use warnings;
 use Scalar::Util qw/refaddr/;
 
-our $VERSION = '1.007';
+our $VERSION = '1.008';
 
 BEGIN { __PACKAGE__->mk_accessors(qw/user store/) }
 
@@ -111,8 +111,8 @@ sub stringify {
         return $string;
     }
     else {
-        my ($string) = $self->$userfield;
-        return $string;
+        my $val = $self->$userfield;
+        return ref($val) eq 'ARRAY' ? $val->[0] : $val;
     }
 }