This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function edit($id = null) { | |
$conditions=['User.id' => $id]; // check the ID of the User to be edited exists and... | |
if(!$this->isAdmin()){ // if not Admin the User to be edited must belong to the Doctor | |
$conditions[] = ['User.doctor_id' => $this->Auth->user('id')]; | |
} | |
if (!$user=$this->User->find('first', ['conditions' => $conditions])) { // if the check fails return a 404 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="content"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<div class="box"> | |
<div class="box-header with-border"> | |
<h3 class="box-title">Survey Results</h3> | |
</div> | |