vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Failed Login Notification on.... CC the admins? (https://vborg.vbsupport.ru/showthread.php?t=279427)

Munkholm 03-02-2012 09:01 AM

Failed Login Notification on.... CC the admins?
 
Hi.

Would like to get a copy of the email, which is sent to the users, once they get locked out by the strikes system...

Have made a amateurish attempt by adding "; webmaster@domain.tld", to the functions_login.php, but that didn't work :o

Any suggestions on how to accomplish this? Thanks.

Code:

                if ($strikes_user['strikes'] == 4)                // We're about to add the 5th Strike for a user
                {
                        if ($user = $vbulletin->db->query_first("SELECT userid, username, email, languageid FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string($username) . "' AND usergroupid <> 3"))
                        {
                                $ip = IPADDRESS;
                                eval(fetch_email_phrases('accountlocked', $user['languageid']));
                                vbmail($user['email']; webmaster@domain.tld, $subject, $message, true);
                        }
                }


kh99 03-03-2012 12:08 PM

I havne't tested it, but you could try this:

Code:

vbmail($user['email'], $subject, $message, true, '', 'Cc: <webmaster@domain.tld>');

Munkholm 03-03-2012 01:23 PM

Nope, not working! But thanks for trying :up:

kh99 03-03-2012 01:37 PM

Ah....how about this?

Code:

vbmail($user['email'], $subject, $message, true, '', "Cc: <webmaster@domain.tld>\n");

nhawk 03-03-2012 05:43 PM

Editing the source code for vB is never a good idea. Doing that means you have to edit the code every time you upgrade.

Try this...

Go to ACP->Plugins & Products->Plugin Manager. Scroll down to the bottom and click 'Add New Plugin'.

On the page that follows enter this info...

Product: vBulletin
Hook Location: login_strikes
Title: Admin Failed Login Email
Execution Order: 5

Code...
Code:

if ($strikes_user['strikes'] >= 5 && $message)
{
        vbmail('yourname@youremail.com', $subject, $message, true);
}



All times are GMT. The time now is 02:10 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03256 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete