Skip to content

Commit

Permalink
#254 check valid sender email
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Dec 8, 2015
1 parent bd0e0c4 commit b3a7515
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions adm_program/modules/messages/messages_send.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@
$postName = $gCurrentUser->getValue('FIRST_NAME', 'database'). ' '. $gCurrentUser->getValue('LAST_NAME', 'database');
$postFrom = $gCurrentUser->getValue('EMAIL');
}
else
{
if($postName == '')
{
$gMessage->show($gL10n->get('SYS_FIELD_EMPTY', $gL10n->get('MAI_YOUR_NAME')));
}
elseif(!strValidCharacters($postFrom, 'email'))
{
$gMessage->show($gL10n->get('SYS_EMAIL_INVALID', $gL10n->get('MAI_YOUR_EMAIL')));
}
}

// if no User is set, he is not able to ask for delivery confirmation
if(!($gCurrentUser->getValue('usr_id') > 0 && $gPreferences['mail_delivery_confirmation'] == 2) && $gPreferences['mail_delivery_confirmation'] != 1)
Expand Down

0 comments on commit b3a7515

Please sign in to comment.