/** * Saves new invitation data in DB and returns instance * * @param Mage_Customer_Model_Session $sessionData * * @return AW_Points_Model_Invitation */ public function saveNewInvitation($sessionData) { $this->setData($sessionData->getData()); $this->addData(array('protection_code' => md5(uniqid(microtime(), true)), 'status' => self::INVITATION_NEW, 'date' => $this->getResource()->formatDate(time()))); $this->save(); return $this; }
/** * Get restore password params. * * @param Mage_Customer_Model_Session $session * @return array array ($customerId, $resetPasswordToken) */ protected function _getRestorePasswordParameters(Mage_Customer_Model_Session $session) { return array((int) $session->getData(self::CUSTOMER_ID_SESSION_NAME), (string) $session->getData(self::TOKEN_SESSION_NAME)); }