This patch adds user invitations, a way for existing users on a site
to send an email to their friends and invite them to create an account on the site. The feature is enabled or disabled in the site Settings. (Operation/Settings.pm) It is implemented as a new operation, Invite (Operation/Invite.pm, Help/Invite.pm, i18n/English/Invite.pm), and the option is displayed as an option on the user's account screen. (Operation/Shared.pm). The form is templated, and lives in the Invite namespace. Once the invitation is submitted, if the user's email address is not already in WebGUI, an email is sent and a record is stored in the userInvitations table. When the friend gets the invitation, they are taken to the account creation screen, which conveniently has their email address already filled in. This required changes in the Auth modules (Auth.pm, Auth/*.pm), and ProfileField.pm. The latter was so that profile fields can have their values manually set. The former changes handle inserting the email address, bypassing the anonymous registration check, and updating the record in ther userInvitations table. I refactored some code out of the AdminConsole for finding the url back to the site and added it to Session/Url.pm. The method is called getBackToSiteUrl.
This commit is contained in:
parent
32f7866f3b
commit
21c4fcb75f
18 changed files with 586 additions and 28 deletions
|
|
@ -3676,10 +3676,9 @@ and tracked by WebGUI.|,
|
|||
lastUpdated => 1163457062,
|
||||
},
|
||||
|
||||
'Enable passive profiling description' => {
|
||||
message => q|Used in conjunction with Metadata, this keeps a record of every wobject viewed by
|
||||
a user.|,
|
||||
lastUpdated => 1167189802,
|
||||
'Enable user invitations description' => {
|
||||
message => q|Enable users to send emails to their friends, inviting them to come and create an account on this site.|,
|
||||
lastUpdated => 1181017746,
|
||||
},
|
||||
|
||||
'164 description' => {
|
||||
|
|
@ -3788,6 +3787,17 @@ Select which of the configured LDAP connections to use to authenticate users.
|
|||
lastUpdated => 1089039511
|
||||
},
|
||||
|
||||
'Enable passive profiling description' => {
|
||||
message => q|Used in conjunction with Metadata, this keeps a record of every wobject viewed by
|
||||
a user.|,
|
||||
lastUpdated => 1167189802,
|
||||
},
|
||||
|
||||
'Enable user invitations' => {
|
||||
message => q|Enable user invitations?|,
|
||||
lastUpdated => 1181017730
|
||||
},
|
||||
|
||||
'Illegal Warning' => {
|
||||
message => q|Enabling this feature is illegal in some countries, like Australia. In addition, some countries require you to add a warning to your site if you use this feature. Consult your local authorities for local laws. Plain Black Corporation is not responsible for your illegal activities, regardless of ignorance or malice.|,
|
||||
lastUpdated => 1089039511
|
||||
|
|
@ -4077,6 +4087,21 @@ Get a copy of wget and use this: <code>wget -p -r --html-extension -k http://the
|
|||
lastUpdated => 1161388472,
|
||||
},
|
||||
|
||||
'invite a friend' => {
|
||||
message => q|Invite a friend|,
|
||||
lastUpdated => 1181019679,
|
||||
},
|
||||
|
||||
'user invitations email exists' => {
|
||||
message => q|Email exists message|,
|
||||
lastUpdated => 1181277915
|
||||
},
|
||||
|
||||
'user invitations email exists description' => {
|
||||
message => q|This is the message displayed to users who try to invite someone whose email address already exists in the system.|,
|
||||
lastUpdated => 1181277914,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue