Skip to content

Instantly share code, notes, and snippets.

@ashleydavies
Created July 14, 2015 11:14
Show Gist options
  • Save ashleydavies/8d41b58d821c712e0d9b to your computer and use it in GitHub Desktop.
Save ashleydavies/8d41b58d821c712e0d9b to your computer and use it in GitHub Desktop.
public function initialize() {
parent::initialize();
$this->Auth->deny();
$this->loadModel('Users');
$this->loadModel('Items');
$user = $this->Users->find()
->where(['id' => $this->Auth->user('id')])
->contain(['Ranks'])
->first()
->toArray();
$this->set('user', $user);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment