public function actionActivation() { $email = $_GET['email']; $activekey = $_GET['activekey']; if ($email && $activekey) { $model = new wUsers(); $find = wUsers::model()->findByAttributes(array('email' => $email)); if (isset($find) && $find->status) { $this->render('message', array('title' => Yii::t('web/app', 'active_user'), 'content' => Yii::t("web/app", "actived"))); } elseif (isset($find->active_key) && $find->active_key == $activekey) { $find->active_key = CFunction::random_generator(Yii::app()->params->number_active); $find->status = 1; if ($model->updateActive(1, $find->activekey, $email)) { $this->render('message', array('title' => Yii::t('web/app', 'active_user'), 'content' => Yii::t("web/app", "actived_success"))); } } else { $this->render('message', array('title' => Yii::t('web/app', 'active_user'), 'content' => Yii::t("web/app", "actived_url_failed"))); } } else { $this->render('/users/message', array('title' => Yii::t('web/app', 'active_user'), 'content' => Yii::t("web/app", "actived_url_failed"))); } }