Skip to content

Instantly share code, notes, and snippets.

@joebordes
Last active March 9, 2017 08:18
Show Gist options
  • Select an option

  • Save joebordes/a8bec50f2773f0d263e4707cc331b0e9 to your computer and use it in GitHub Desktop.

Select an option

Save joebordes/a8bec50f2773f0d263e4707cc331b0e9 to your computer and use it in GitHub Desktop.
Add access IP message to Login screen
diff --git a/modules/Users/Login.php b/modules/Users/Login.php
index 9966bc6..d031f2d 100644
--- a/modules/Users/Login.php
+++ b/modules/Users/Login.php
@@ -58,7 +58,8 @@ else
if(isset($_SESSION["login_error"])) {
$login_error = $_SESSION['login_error'];
} else {
- $login_error = '';
+ $the_ip = Vtiger_Request::get_ip();
+ $login_error = 'Restricted access to authorised personnel only<br> You are connecting from IP '.$the_ip;
}
require_once('Smarty_setup.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment