User management login

I have installed the user management module successfully.

But i get this error when i go to this "http://localhost/mytestapp/index.php/user/user/login" address and enter admin/admin

Description

Property "CWebUser.isAdmin" is not defined.

Source File

…yii\framework\web\auth\CWebUser.php(108)

00096: /**

00097: * PHP magic method.

00098: * This method is overriden so that persistent states can be accessed like properties.

00099: * @param string property name

00100: * @return mixed property value

00101: * @since 1.0.3

00102: */

00103: public function __get($name)

00104: {

00105: if($this->hasState($name))

00106: return $this->getState($name);

00107: else

00108: return parent::__get($name);

00109: }

00110:

00111: /**

00112: * PHP magic method.

00113: * This method is overriden so that persistent states can be set like properties.

00114: * @param string property name

00115: * @param mixed property value

00116: * @since 1.0.3

00117: */

00118: public function __set($name,$value)

00119: {

00120: if($this->hasState($name))

How could i possibly resolve this?

-thanks

[url="http://rowsandcolumns.blogspot.com/"]

[/url]

I have the same problem. Is there anybody who can help us ? :)

We need much more information than this: some part of your own application code is attempting to use isAdmin, and here we’re seeing the low-level __get handler being unable to find it.

Look in (or post!) the complete stack trace, but please check first to find which one of the lines represents code in the application rather than the framework. That will point you to the problem.

Steve

Thanks for your reply!

Here is the stack trace:

i was searching in files mentioned in #2, #3 and #4 but i didn’t found any use of $x->isAdmin instead of $x->isAdmin() (i’ve found a thread in which someone told that it ca be caused by that)

please tell me what else do you need

  • edit:

the 10 line in YumMenuItemHelper.php is:


(!Yii::app()->user->isAdmin() && ( Yii::app()->user->hasUsers() || Yii::app()->user->hasRole('UserCreation'))),

Ah, your Edit showing the line in question explains it.

Yii::app()->user is referring to the CWebUser class, which doesn’t have the notion of isAdmin. I believe that you (or your user-management package) are supposed to provide your own implementation class on top of CWebUser that adds your own notions of what an admin is.

Where did you find this user management module?

http://www.yiiframework.com/extension/yii-user-management/

i’m using this one. Offcourse if you know any better, feel free to recommend me it ;)