Skip to content

Instantly share code, notes, and snippets.

@joebordes
Created March 7, 2017 07:12
Show Gist options
  • Save joebordes/76fa03df161a0b6ce203587b13cfa5fe to your computer and use it in GitHub Desktop.
Save joebordes/76fa03df161a0b6ce203587b13cfa5fe to your computer and use it in GitHub Desktop.
Add access IP on Restricted access message
diff --git a/modules/Users/Users.php b/modules/Users/Users.php
index c0416f6..7ab9e57 100644
--- a/modules/Users/Users.php
+++ b/modules/Users/Users.php
@@ -336,7 +336,7 @@ class Users extends CRMEntity {
if (!in_array($the_ip,$user_ip_addresses)) {
$row['status'] = 'Inactive';
$this->authenticated = false;
- coreBOS_Session::set('login_error', getTranslatedString('ERR_INVALID_USERIPLOGIN','Users'));
+ coreBOS_Session::set('login_error', getTranslatedString('ERR_INVALID_USERIPLOGIN','Users').' ('.$the_ip.')');
$mailsubject = "[Security Alert]: User login attempt rejected for login: $usr_name from external IP: $the_ip";
$this->log->warn($mailsubject);
// Send email with authentification error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment