added runOnLogin and runOnLogout functionality.
This commit is contained in:
parent
75b03b006e
commit
58f1b9c4aa
1 changed files with 18 additions and 0 deletions
|
|
@ -578,6 +578,15 @@ sub login {
|
|||
$self->session->http->setRedirect($self->session->scratch->get("redirectAfterLogin"));
|
||||
$self->session->scratch->delete("redirectAfterLogin");
|
||||
}
|
||||
|
||||
my $command = $self->session->config->get("runOnLogin");
|
||||
if ($command ne "") {
|
||||
WebGUI::Macro::process($self->session,\$command);
|
||||
$self->session->errorHandler->warn("Executing $command");
|
||||
my $error = qx($command);
|
||||
$self->session->errorHandler->warn($error) if $error;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
@ -595,6 +604,15 @@ sub logout {
|
|||
$self->session->user({userId=>'1'});
|
||||
my $u = WebGUI::User->new($self->session,1);
|
||||
$self->{user} = $u;
|
||||
|
||||
my $command = $self->session->config->get("runOnLogout");
|
||||
if ($command ne "") {
|
||||
WebGUI::Macro::process($self->session,\$command);
|
||||
$self->session->errorHandler->warn("Executing $command");
|
||||
my $error = qx($command);
|
||||
$self->session->errorHandler->warn($error) if $error;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue