Created init.php 

This file is to be used/required on top of every php file in which you are checking and retrieving user info!!

Example :

in home.php
<?php

require_once 'init.php'  //must be relative path from the in which you are using it.

/** Your Code Goes HERE **/