Commit 843e18c6 authored by Yadd's avatar Yadd

Initialize user() in $req (#1591)

parent 5aad03fd
......@@ -45,8 +45,8 @@ sub uri { $_[0]->{uri} }
sub userData {
my ( $self, $v ) = @_;
return $_[0]->{userData} = $v if ($v);
return $_[0]->{userData} || { _whatToTrace => $_[0]->user, };
return $self->{userData} = $v if ($v);
return $self->{userData} || { _whatToTrace => $self->{user}, };
}
sub respHeaders {
......
......@@ -115,9 +115,12 @@ sub error_type {
}
sub init {
my ($self) = @_;
my ( $self, $conf ) = @_;
$self->{$_} = {} foreach (qw(data customParameters sessionInfo pdata));
$self->{$_} = [] foreach (qw(respCookies));
if ( my $tmp = $self->userData->{ $conf->{whatToTrace} } ) {
$self->user($tmp);
}
}
sub errorString {
......
......@@ -38,7 +38,7 @@ sub handler {
my ( $self, $req ) = @_;
bless $req, 'Lemonldap::NG::Portal::Main::Request';
$req->init();
$req->init( $self->conf );
my $sp = 0;
# Restore pdata
......
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