mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 18:05:45 +03:00
Pledge Form: Encourge group email addresses for perennial access.
Also, clarfy that the field is referring to an address, rather than a piece of email.
This commit is contained in:
parent
6b33c4dbd0
commit
33d8ed54b1
2 changed files with 6 additions and 2 deletions
|
@ -67,6 +67,8 @@ function process_form_new() {
|
|||
Pledge\CPT_ID
|
||||
);
|
||||
|
||||
// todo make this validation DRY w/ process_form_manage().
|
||||
|
||||
if ( has_existing_pledge( $email, 'email' ) ) {
|
||||
return new WP_Error(
|
||||
'existing_pledge_email',
|
||||
|
@ -74,6 +76,8 @@ function process_form_new() {
|
|||
);
|
||||
}
|
||||
|
||||
// todo should probably verify that email address is for the same domain as URL. do here and for manage.
|
||||
|
||||
$domain = PledgeMeta\get_normalized_domain_from_url( $submission['org-url'] );
|
||||
|
||||
if ( has_existing_pledge( $domain, 'domain' ) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue