Run on registration and alert on new user have been converted to a single workflow.

This commit is contained in:
JT Smith 2006-03-10 03:48:23 +00:00
parent 5956fce2f1
commit 3e60294bb6
33 changed files with 315 additions and 50 deletions

View file

@ -28,6 +28,7 @@ use WebGUI::Utility;
use WebGUI::User;
use WebGUI::Operation::Shared;
use WebGUI::Operation::Profile;
use WebGUI::Workflow::Instance;
=head1 NAME
@ -267,10 +268,15 @@ sub createAccountSave {
$self->session->var->start($userId,$self->session->getId);
$self->_logLogin($userId,"success");
$self->session->http->setStatus(201,"Account Registration Successful");
my $command = $self->session->setting->get("runOnRegistration");
WebGUI::Macro::process($self->session,\$command);
system($command) if ($self->session->setting->get("runOnRegistration") ne "");
WebGUI::MessageLog::addInternationalizedEntry('',$self->session->setting->get("onNewUserAlertGroup"),'',536) if ($self->session->setting->get("alertOnNewUser"));
if ($self->session->setting->get("runOnRegistration")) {
WebGUI::Workflow::Instance->create($self->session, {
workflowId=>$self->session->setting->get("runOnRegistration"),
methodName=>"new",
className=>"WebGUI::User",
parameters=>$self->session->userId,
priority=>1
});
}
return "";
}