changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / auth-liveuser / session_ip_verifier.php
1 <?
2 /* checks to see if the user's ssl_session_id or ip_address has changed.
3    if it has, log them out.
4
5    written by: Jeffrey Engleman
6 */
7
8 $ewiki_plugins["init"][-6] = "ewiki_session_ip_verify";
9
10 function ewiki_session_ip_verify(){
11
12   global $liveuser;
13   
14   $logindata=ewiki_liveuser_get_login_data();
15
16   if($_SESSION['loginInfo']['ip_address']!==$logindata['ip_address'] || $_SESSION['loginInfo']['ssl_session_id']!==$logindata['ssl_session_id']){
17     //they've changed...this is weird...log em out
18     $liveuser->logout();
19   }
20   
21 }
22
23 ?>