Jump to content
Larry Ullman's Book Forums

mrs

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About mrs

  • Rank
    Newbie
  1. Hi, After click on activation link http://www.example.com/devtest/index.php?r=user/check&activationcode=bc74873d0e3f684d3e6b99a36169a793ee688406 then it redirect to login page. I think my following controller code not working for view file check.php which located on user directory. public function actionCheck() { $model=new User; $activationcode = Yii::app()->request->getQuery('activationcode'); if(isset($activationcode)) { $model = User::model()->findByAttributes(array('activationcode'=>$activationcode)); if($model !== null) { $model->status=1; $model->save
  2. Hi All, I am facing problem to activate an user by click on activation link that sent by email. Here is my code- UserController.php: public function actionCreate() { $model=new User; // Uncomment the following line if AJAX validation is needed $this->performAjaxValidation($model); if(isset($_POST['User'])) { $model->attributes=$_POST['User']; $model->createtime=date('Y-m-d H:i:s'); $model->activationcode = sha1(mt_rand(10000, 99999).time().$model->email); if($model->save()) { $to = $model->email; $subject = "Welcome To My Site!" $message2 = "<h
×
×
  • Create New...