diff options
-rw-r--r-- | actions/email/save.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actions/email/save.php b/actions/email/save.php index 006445b99..7493538f9 100644 --- a/actions/email/save.php +++ b/actions/email/save.php @@ -22,6 +22,11 @@ if (!$user_id) { $user = get_entity($user_id); } +if (!is_email_address($email)) { + register_error(elgg_echo('email:save:fail')); + forward($_SERVER['HTTP_REFERER']); +} + if ($user) { if (strcmp($email,$user->email)!=0) { if (!get_user_by_email($email)) { |