Commit 1015e446 authored by Xavier Guimard's avatar Xavier Guimard

Fix some little errors (#1338)

parent ca61f222
......@@ -252,7 +252,9 @@ sub getRegisterSession {
foreach my $id ( keys %$sessions ) {
my $registerSession = $self->p->getApacheSession($id);
next unless ($registerSession);
return $id if ( $registerSession->data->{_type} =~ /^register$/ );
return $id
if ( $registerSession->data->{_type}
and $registerSession->data->{_type} =~ /^register$/ );
}
# No register session found, return empty string
......
......@@ -213,7 +213,7 @@ sub _register {
# Search for user using UserDB module
# If the user already exists, register is forbidden
$req->datas->{mail} = $req->{registerInfo}->{mail};
$req->datas->{mail} = $req->datas->{registerInfo}->{mail};
if ( $self->p->_userDB->getUser($req) == PE_OK ) {
$self->userLogger->error(
"Register: refuse mail $req->{mail} because already exists in UserDB"
......
......@@ -57,7 +57,7 @@ sub getUser {
return PE_BADCREDENTIALS;
}
unless ( $req->datas->{entry} = $mesg->entry(0) ) {
my $user = $req->{mail} || $req->{user};
my $user = $req->datas->{mail} || $req->{user};
$self->userLogger->warn("$user was not found in LDAP directory");
eval { $self->p->_authentication->setSecurity($req) };
return PE_BADCREDENTIALS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment