Just for aesthetical

This commit is contained in:
Xavier Guimard 2013-09-29 18:06:54 +00:00
parent 187bbe9efa
commit 106de86477

View File

@ -42,20 +42,19 @@ sub getUser {
sub setSessionInfo { sub setSessionInfo {
my $self = shift; my $self = shift;
if ( ref( $self->{exportedVars} ) eq 'HASH' ) { if ( ref( $self->{exportedVars} ) eq 'HASH' ) {
foreach my $k ( keys %{ $self->{exportedVars} } ) { while ( my ( $k, $v ) = each %{ $self->{exportedVars} } ) {
my $attr = $k; my $attr = $k;
my $required = ( $attr =~ s/^!// ); my $required = ( $attr =~ s/^!// );
if ( $self->{exportedVars}->{$k} =~ if ( $v =~
/^(?:(?:(?:full|nick)nam|languag|postcod|timezon)e|country|gender|email|dob)$/ /^(?:(?:(?:full|nick)nam|languag|postcod|timezon)e|country|gender|email|dob)$/
) )
{ {
$self->{sessionInfo}->{$attr} = $self->{sessionInfo}->{$attr} = $self->param("openid.sreg.$v");
$self->param("openid.sreg.$self->{exportedVars}->{$k}");
} }
else { else {
$self->lmLog( $self->lmLog(
'Ignoring attribute ' 'Ignoring attribute '
. $self->{exportedVars}->{$k} . $v
. ' which is not a valid OpenID SREG attribute', . ' which is not a valid OpenID SREG attribute',
'warn' 'warn'
); );