CFormModel is not populating data

So I’m trying to send out an email, $resend validations check if the email is in the database.

The problem I’m getting is $resend->email is being populated, like its empty or NULL. and the email isn’t being sent out,

however if I hard code the email $signUpEmail->addTo(‘’); then it works fine. So somehow $resend->email is not being saved from the form or something.

Here is the code

public function actionVerify()


                $model = new VerifyForm;

                $resend = new ResendForm;


            $this->performAjaxValidationTwo(array($model,$resend), 'verify-form');















                                $signUpEmail = New YiiMailMessage;

                                //$signUpEmail->view = 'signup';

                                //$signUpEmail->setBody(array('model'=>$model), 'text/html');

                                $signUpEmail->setFrom(array('' => 'Notes For Us'));

                                $signUpEmail->setSubject('Welcome - Notes For Us');













Did you declare safe attributes? -

I tried it with safe attribute, still doesn’t work. Also tried it without :(

public function rules()


		return array(

			// username and password are required

			// rememberMe needs to be a boolean

			// password needs to be authenticated


                        //array('username', 'finduser'),

			array('email', 'email'),

                        array('email', 'verify'),

                        array('email', 'safe'),









        public function verify($attribute, $params) {


            //$this->username = '';




            'select'=>'verify_code, id, verified',





            if($user == NULL) {



                $this->addError('emailinfo', '✖   I could not find the username');







Found the error, this is what happens with lack of sleep haha. Spent like 2 hours looking for the error, running on like 2 hours of sleep :(


should be