I have a leave\_applications table and an employees table. When an employee applies for a leave that is stored in leave\_applications table along with employee id.
When next time employee logs in I am displaying leave applications he has applied for so far. But the problem is all leave applications are being displayed (even from other employees) which should not be the case. So how to I restrict that only the logged in employee sees his leave applications?
My LeaveApplicationsController.php page is this which displays leaves:

```
public function index()
    {
        $this->LeaveApplication->recursive = 0;
        $leavereqs = $this->set('leaveApplications', $this->Paginator->paginate());
        //return $this->LeaveApplication->Employee->find('all', array('conditions' => array('LeaveApplications.employee_id'=>$this->Auth->user('id'))));
        return $this->LeaveApplication->find('all');
        //echo $log_user_id = $this->Auth->user('role'); die();
        //return $this->LeaveApplication->Employee->query("SELECT * FROM leave_applications WHERE employee_id = '$log_user_id'");
        //return $this->LeaveApplication->Employee->query("SELECT la.leave_type, la.subject, la.detail, la.from_date, la.to_date, la.applied_on, la.leave_status, la.leave_status_date FROM leave_applications la INNER JOIN employees e ON la.employee_id = e.id INNER JOIN users u ON e.user_id = u.id WHERE la.employee_id = '$log_user_id'");
    }

```

Please note that I have this code in LeaveApplicationsController.php not in EmployeesController.php because when employee clicks on all leaves button/link this controller's index view is called.
Commented code is what I tried but none of them are working.