/** * Moves ContactAddress's up to the root so that we can easily add/edit them from User::edit() * @todo Should this be in the afterFind? ^JB * * @param string $type * @param array $query * @return mixed */ public function find($type = 'first', $query = array()) { $user = parent::find($type, $query); if (isset($user['Contact']['ContactAddress'][0])) { $user['ContactAddress'] = $user['Contact']['ContactAddress']; } return $user; }