mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
ignore exception while sending notification to admin (eg. SMTP error), to block the account and give a correct error-message to user
This commit is contained in:
parent
f2f92a5b5f
commit
ea0f1a7ed5
@ -710,11 +710,16 @@ class egw_session
|
|||||||
$subject = lang("eGroupWare: login blocked for user '%1', IP %2",$login,$ip);
|
$subject = lang("eGroupWare: login blocked for user '%1', IP %2",$login,$ip);
|
||||||
$body = lang("Too many unsucessful attempts to login: %1 for the user '%2', %3 for the IP %4",$false_id,$login,$false_ip,$ip);
|
$body = lang("Too many unsucessful attempts to login: %1 for the user '%2', %3 for the IP %4",$false_id,$login,$false_ip,$ip);
|
||||||
|
|
||||||
$subject = $GLOBALS['egw']->send->encode_subject($subject);
|
|
||||||
$admin_mails = explode(',',$GLOBALS['egw_info']['server']['admin_mails']);
|
$admin_mails = explode(',',$GLOBALS['egw_info']['server']['admin_mails']);
|
||||||
foreach($admin_mails as $to)
|
foreach($admin_mails as $to)
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->send->msg('email',$to,$subject,$body,'','','',$from,$from);
|
try {
|
||||||
|
$GLOBALS['egw']->send->msg('email',$to,$subject,$body,'','','',$from,$from);
|
||||||
|
}
|
||||||
|
catch(Exception $e) {
|
||||||
|
// ignore exception, but log it, to block the account and give a correct error-message to user
|
||||||
|
error_log(__METHOD__."('$log', '$ip') ".$e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// save time of mail, to not send to many mails
|
// save time of mail, to not send to many mails
|
||||||
$config = new config('phpgwapi');
|
$config = new config('phpgwapi');
|
||||||
|
Loading…
Reference in New Issue
Block a user