$rc_sth->execute($r_username, $realm) or die $rc_sth->errstr;
foreach my $rc_row ( @{$rc_sth->fetchall_arrayref} ) {
- my($attribute, $value, $name, $groupname) = @$row;
- if ( $attribute =~ /^(Crypt-)?Password$/ ) {
+ my($attribute, $value, $name, $groupname) = @$rc_row;
+ if ( $attribute =~ /^((User|Crypt)-)?Password$/ ) {
$password = $value;
$finger = $name;
$group = $groupname;