Bonjour tout le monde,

I installed the extension yii-user-management on the framework, it almost works perfectly except that when I try to connect to an account or not activated with a wrong password I get an error for an invalid account I get this:

Undefined class constant 'ERROR_STATUS_NOTACTIV' in /var/www/yii/site/protected/modules/user/models/UserLogin.php on line 69

Here are the file in question :



  • LoginForm class.

  • LoginForm is the data structure for keeping

  • user login form data. It is used by the ‘login’ action of ‘UserController’.


class UserLogin extends CFormModel


public &#036;username;

public &#036;password;

public &#036;rememberMe;


 * Declares the validation rules.

 * The rules state that username and password are required,

 * and password needs to be authenticated.


public function rules()


	return array(

		// username and password are required

		array('username, password', 'required'),

		// rememberMe needs to be a boolean

		array('rememberMe', 'boolean'),

		// password needs to be authenticated

		array('password', 'authenticate'),



public function attributeLabels()


if(Yii::app()-&gt;controller-&gt;module-&gt;loginType == 0)

	&#036;username = Yii::t(&quot;UserModule.user&quot;, &quot;Pseudonyme&quot;);

else if(Yii::app()-&gt;controller-&gt;module-&gt;loginType == 1)

	&#036;username = Yii::t(&quot;UserModule.user&quot;, &quot;Adresse email&quot;);

else if(Yii::app()-&gt;controller-&gt;module-&gt;loginType == 2)

	&#036;username = Yii::t(&quot;UserModule.user&quot;, &quot;Pseudonyme ou adresse email&quot;);

	return array(


		'password'=&gt;Yii::t(&quot;UserModule.user&quot;, &quot;password&quot;),

		'rememberMe'=&gt;Yii::t(&quot;UserModule.user&quot;, &quot;Se souvenir de moi la prochaine fois&quot;),




 * Authenticates the password.

 * This is the 'authenticate' validator as declared in rules().


public function authenticate(&#036;attribute,&#036;params)


	if(&#33;&#036;this-&gt;hasErrors())  // we only want to authenticate when no input errors


		&#036;identity=new UserIdentity(&#036;this-&gt;username,&#036;this-&gt;password);




			case UserIdentity::ERROR_NONE:

				&#036;duration=&#036;this-&gt;rememberMe ? 3600*24*30 : 0; // 30 days



			case UserIdentity::ERROR_EMAIL_INVALID:

				&#036;this-&gt;addError(&quot;username&quot;,Yii::t(&quot;UserModule.user&quot;, &quot;Votre adresse email est invalide.&quot;));


			case UserIdentity::ERROR_USERNAME_INVALID:

				&#036;this-&gt;addError(&quot;username&quot;,Yii::t(&quot;UserModule.user&quot;, &quot;Votre pseudo est invalide.&quot;));


			case UserIdentity::ERROR_STATUS_NOTACTIV:

				&#036;this-&gt;addError(&quot;status&quot;,Yii::t(&quot;UserModule.user&quot;, &quot;Votre compte n'est pas activer.&quot;));


			case UserIdentity::ERROR_STATUS_BAN:

				&#036;this-&gt;addError(&quot;status&quot;,Yii::t(&quot;UserModule.user&quot;, &quot;Votre compte est banni.&quot;));


			case UserIdentity::ERROR_PASSWORD_INVALID:

				&#036;this-&gt;addError(&quot;password&quot;,Yii::t(&quot;UserModule.user&quot;, &quot;Mot de passe invalide.&quot;));







line 69 is that one:


Did you know what the error came from?

PS: I even can’t change my password.

Best regards

I believe this was fixed on March 15th.

This module is still actively being worked on. Get the latest from this site or try


I downloaded the extension about 3 days ago,where should a take the updates?

Looks like you downloaded a copy posted on the 14th - a day before the fix you need.

Try the link I provided. You’ll have to download it from Google Code.


Note that this extension is actively being worked on and still transforming considerably.

I have installed this great extantion successfuly, but don’t understant, how can i get value of field in profile that i need from any place in my site??? like this:


but i want



Yii::app()->user->gender etc … help me please

or may be some thing like


It would probably serve you better if you ask in this thread


I’d guess, you’d probably have to use