Merge commit 'v7.10.21' into WebGUI8. Also, add POD and fix broken tests.

This commit is contained in:
Colin Kuskie 2011-10-27 16:45:19 -07:00
commit 4855816a29
72 changed files with 1357 additions and 82 deletions

View file

@ -399,6 +399,15 @@ sub definition {
hoverHelp=>$i18n->get('118 description'),
defaultValue=>$setting->get("anonymousRegistration")
});
push(@fields, {
tab => 'user',
fieldType => 'yesNo',
name => 'enableUsersAfterAnonymousRegistration',
label => $i18n->get('Enable Users after Anonymous Registration?'),
hoverHelp => $i18n->get('enableUsersAfterAnonymousRegistration help'),
defaultValue => $setting->get('enableUsersAfterAnonymousRegistration')
}
);
push(@fields, {
tab=>"user",
fieldType=>"yesNo",

View file

@ -415,6 +415,38 @@ sub www_ajaxCreateUser {
#-------------------------------------------------------------------
=head2 www_confirmUserEmail ( )
Process links clicked from mails sent out by the WaitForUserConfmration
workflow activity.
=cut
sub www_confirmUserEmail {
my $session = shift;
my $f = $session->form;
my $instanceId = $f->get('instanceId');
my $token = $f->get('token');
my $actId = $f->get('activityId');
my $activity = WebGUI::Workflow::Activity->new($session, $actId)
or die;
my $instance = WebGUI::Workflow::Instance->new($session, $instanceId)
or die;
if ($activity->confirm($instance, $token)) {
my $msg = $activity->get('okMessage');
unless ($msg) {
my $i18n = WebGUI::International->new($session, 'WebGUI');
$msg = $i18n->get('ok');
}
return $session->style->userStyle($msg);
}
else {
return $session->privilege->noAccess;
}
}
#-------------------------------------------------------------------
=head2 www_ajaxDeleteUser ( )
Delete a user using a web service.