Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:22:16+00:00 2026-06-12T01:22:16+00:00

I am trying to create a login module in Yi , But I am

  • 0

I am trying to create a login module in Yi , But I am having thsi error and I really donot understand what is is all as I am totally a beginner in Yii. Please tell me what the problem it is and olution for this problem .

Property “UserIdentity.Email” is not defined.

C:\wamp\www\topicoll\protected\components\UserIdentity.php(21)

09 {
10     /**
11      * Authenticates a user.
12      * The example implementation makes sure if the username and password
13      * are both 'demo'.
14      * In practical applications, this should be changed to authenticate
15      * against some persistent user identity storage (e.g. database).
16      * @return boolean whether authentication succeeds.
17      */
18     public function authenticate()
19     {
20             
21                 $users = TblUser::model()->find('Email=?',array($this->Email));
22     //    $user= TblUser::User::model()->find('LOWER(Email)=?',array(strtolower($this->Email)));
23         if($users===null)
24             $this->errorCode=self::ERROR_USERNAME_INVALID;
25         else if(!$users->validatePassword($this->password))
26             $this->errorCode=self::ERROR_PASSWORD_INVALID;
27         else
28         {
29             $this->_id=$users->id;
30             $this->Email=$users->Email;
31             $this->errorCode=self::ERROR_NONE;
32         }
33         return $this->errorCode==self::ERROR_NONE;
Stack Trace
#0  
–  C:\wamp\www\topicoll\protected\components\UserIdentity.php(21): CComponent->__get("Email")
16      * @return boolean whether authentication succeeds.
17      */
18     public function authenticate()
19     {
20             
21                 $users = TblUser::model()->find('Email=?',array($this->Email));
22     //    $user= TblUser::User::model()->find('LOWER(Email)=?',array(strtolower($this->Email)));
23         if($users===null)
24             $this->errorCode=self::ERROR_USERNAME_INVALID;
25         else if(!$users->validatePassword($this->password))
26             $this->errorCode=self::ERROR_PASSWORD_INVALID;
#1  
–  C:\wamp\www\topicoll\protected\models\LoginForm.php(45): UserIdentity->authenticate()
40      * This is the 'authenticate' validator as declared in rules().
41      */
42     public function authenticate($attribute, $params) {
43         if (!$this->hasErrors()) {
44             $this->_identity = new UserIdentity($this->Email, $this->password);
45             if (!$this->_identity->authenticate())
46                 $this->addError('password', 'Incorrect username or password.');
47         }
48     }
49 
50     /**
#2  
+  C:\wamp\www\yii\framework\validators\CInlineValidator.php(43): LoginForm->authenticate("password", array())
#3  
+  C:\wamp\www\yii\framework\validators\CValidator.php(197): CInlineValidator->validateAttribute(LoginForm, "password")
#4  
+  C:\wamp\www\yii\framework\base\CModel.php(158): CValidator->validate(LoginForm, null)
#5  
–  C:\wamp\www\topicoll\protected\controllers\SiteController.php(110): CModel->validate()
105         {
106             $model->attributes=$_POST['LoginForm'];
107                         
108 //                        var_dump($model);
109             // validate user input and redirect to the previous page if valid
110             if($model->validate() && $model->login())
111                         {
112                             $this->redirect(array('site/login', 'email'=>$model->Email));
113                             
114                             echo $model->Email;
115                            
#6  
+  C:\wamp\www\yii\framework\web\actions\CInlineAction.php(50): SiteController->actionLogin()
#7  
+  C:\wamp\www\yii\framework\web\CController.php(309): CInlineAction->runWithParams(array("r" => "site/login"))
#8  
+  C:\wamp\www\yii\framework\web\CController.php(287): CController->runAction(CInlineAction)
#9  
+  C:\wamp\www\yii\framework\web\CController.php(266): CController->runActionWithFilters(CInlineAction, array())
#10 
+  C:\wamp\www\yii\framework\web\CWebApplication.php(276): CController->run("login")
#11 
+  C:\wamp\www\yii\framework\web\CWebApplication.php(135): CWebApplication->runController("site/login")
#12 
+  C:\wamp\www\yii\framework\base\CApplication.php(162): CWebApplication->processRequest()
#13 
+  C:\wamp\www\topicoll\index.php(13): CApplication->run()
2012-09-28 07:22:44 Apache/2.2.21 (Win32) PHP/5.3.8 Yii Framework/1.1.10
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:22:17+00:00Added an answer on June 12, 2026 at 1:22 am

    replace $this->Email with $this->username in your UserIdentity.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a beginner in php, and I am trying to create a login and
Ok so I am trying create a login script, here I am using PHP5
I am new to zend. I am trying to create login form using zend
I am trying to create a login screen for an iphone application using sqlite3
I'm trying to create a login system using PHP, and I'm not quite sure
I am trying to create a login page that will send the user to
What I'm trying to do I'm trying to create a Login which is fully
Im trying to create a iPhone Objective C login page using PHP/MySQL to authenticate.
I am trying to create a C# script to login automatically to a website
I'm trying to create two ASP.NET Membership login pages for an ASP.NET website I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.