Small cleanups.
[Project_webapp.git] / lib / utils.php
index bc5db9b6a6026aed5173b9083f60d3b89f7e651d..8fdb0aa66d7834a235d0d8ce05d08a1d6e965df6 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 function is_post_request()
 {
     if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {
@@ -53,7 +54,7 @@ function chk_password($email, $password)
 
 function chk_logged_in()
 {
-    if (isset($_SESSION['email'])) {
+    if (isset($_SESSION['email']) && isset($_SESSION['IP_address'])) {
         return true;
     } else {
         return false;