_getTable()->searchBy(array('email' => $email), 'id'))) { $this->setPrimaryKey($id); } return $this; } /** * Set primary key for recover code * * @param string $recoverCode * @return Obj */ public function setPrimaryKeyByRecoverCode($recoverCode) { if (false !== ($id = $this->_getTable()->searchBy(array('recoverCode' => $recoverCode), 'id'))) { $this->setPrimaryKey($id); } return $this; } /** * Set code for password recover * * @param string $recoverCode * @param string $expirationDate * @return Obj */ public function setRecoverCode($recoverCode, $expirationDate) { $updateData = array( 'recoverCode' => $recoverCode, 'recoverCodeExpirationDate' => $expirationDate ); $this->_getTable()->updateByKey($updateData, $this->_primaryKey); return $this; } protected function _insertDependency() { return $this; } protected function _updateDependency() { return $this; } protected function _deleteDependency() { return $this; } }