Add workflow activity for expiry of users with unvalidated email addresses.
This commit is contained in:
parent
631d8cb0e6
commit
133cac4f77
5 changed files with 139 additions and 1 deletions
|
|
@ -758,10 +758,11 @@ sub resetExpiredPasswordSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub validateEmail {
|
||||
my $self = shift;
|
||||
my ($userId) = $self->session->db->quickArray("select userId from authentication where fieldData=".$self->session->db->quote($self->session->form->process("key"))." and fieldName='emailValidationKey' and authMethod='WebGUI'");
|
||||
my ($userId) = $self->session->db->quickArray("select userId from authentication where fieldData=? and fieldName='emailValidationKey' and authMethod='WebGUI'", [$self->session->form->process("key")]);
|
||||
if (defined $userId) {
|
||||
my $u = WebGUI::User->new($self->session,$userId);
|
||||
$u->status("Active");
|
||||
$self->session->db->write("DELETE FROM authentication WHERE userId = ? AND fieldName = 'emailValidationKey'");
|
||||
}
|
||||
return $self->displayLogin;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue