/** * Override method when the author allowed to edit own. * * @access protected * @param array $data An array of input data. * @param string $key The name of the key for the primary key; default is id.. * * @return boolean True on success */ protected function allowEdit($data = array(), $key = id) { return parent::allowEdit($data, $key, array('key_author' => 'created_by')); }