Extension talk:LoginNotify

Latest comment: 10 months ago by Derek Jones Smr in topic Admin notifications

Admin notifications

edit

Hello, its a very interesting extension.

I would like to configure it for administrative purpous.

Is it possible to configure the plugin so that notifications about suspicious login errors are sent to the site administrator's mailbox? Derek Jones Smr (talk) 11:02, 28 December 2023 (UTC)Reply

Perhaps someone will be interested..
I had to read the basics of PHP, and in the end I found the function I needed in LoginNotify.php:
private function sendNotice( User $user, $type, $count = null )
I added a copy of the event call and overridden the mailbox to send a copy of the message to the admin:
$muser = $user;
$muser->mEmail="admin@mydomain.com";
EchoEvent::create( [
'type' => $type,
'extra' => $extra,
'agent' => $muser,
] );
profit :) Derek Jones Smr (talk) 12:39, 10 January 2024 (UTC)Reply
Return to "LoginNotify" page.