/** * Validate the GET variables and execute our * main function to edit the logged in user's * existing address * * @return void * @throws Exception */ public function actionEditAddress() { $this->checkoutForm = MultiCheckoutForm::loadFromSessionOrNew(); $strType = Yii::app()->getRequest()->getQuery('type'); if ($strType !== 'billing' && $strType !== 'shipping') { Yii::log('Incorrect string for type. Must be "shipping" or "billing"', 'error', 'application.' . __CLASS__ . '.' . __FUNCTION__); throw new Exception(Yii::t('checkout', 'Address type is missing or incorrect')); } $intAddressId = Yii::app()->getRequest()->getQuery('id'); $blnAddressBelongsToUser = $this->checkoutForm->addressBelongsToUser($intAddressId); if ($blnAddressBelongsToUser === false) { Yii::log(sprintf('Address %s does not belong to user %s', $intAddressId, Yii::app()->user->id), 'error', 'application.' . __CLASS__ . '.' . __FUNCTION__); throw new Exception(Yii::t('checkout', 'Address id is null or does not belong to user')); } $this->addressEditor($strType, self::EDITADDRESS, $intAddressId); }