From 4f570b67c9975e3f094d6a066c9105aac3cc6a00 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 28 Jun 2007 20:03:22 +0000 Subject: [PATCH] Forward port of inactive user group email fix, and user status documentation. --- docs/changelog/7.x.x.txt | 4 ++++ lib/WebGUI/Mail/Send.pm | 1 + lib/WebGUI/User.pm | 3 +++ 3 files changed, 8 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 8f32f463e..1d60eb345 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -49,6 +49,10 @@ - RFE: HttpProxy - regexp for URLs that will not be proxied. Url pattern filters can now be created in HttpProxy wobject properties. +7.3.20 + - fix: Deactivated Users Subscriptions (perlDreamer Consulting, LLC) + http://www.webgui.org/bugs/tracker/deactivated-users-subscriptions + 7.3.19 - Fixed a formatting problem in the workflow editor screen. - fix: bad javascript string escaping in EMS diff --git a/lib/WebGUI/Mail/Send.pm b/lib/WebGUI/Mail/Send.pm index 68520b9aa..970938623 100644 --- a/lib/WebGUI/Mail/Send.pm +++ b/lib/WebGUI/Mail/Send.pm @@ -419,6 +419,7 @@ sub send { $self->{_message}->head->replace("cc", undef); foreach my $userId (@{$group->getAllUsers(1)}) { my $user = WebGUI::User->new($self->session, $userId); + next unless $user->status eq 'Active'; ##Don't send this to invalid user accounts if ($user->profileField("email")) { $self->{_message}->head->replace("To",$user->profileField("email")); $self->queue; diff --git a/lib/WebGUI/User.pm b/lib/WebGUI/User.pm index 768895183..3d6b2f627 100644 --- a/lib/WebGUI/User.pm +++ b/lib/WebGUI/User.pm @@ -533,6 +533,9 @@ Returns the status of the user. =head3 value If specified, the status is set to this value. Possible values are 'Active', 'Selfdestructed' and 'Deactivated'. +'Selfdestructed' means that the user deactivated their own account. 'Deactivated' means that either +their status has been changed by an Admin, or that this is a new account that is pending email +confirmation before activation. =cut