Rights Extension

Hi, I’m newbie, I just started learning PHP 1 month ago, and Yii is the first framework that I use, I am very confused to install right extension… Any One can give me the tutorial (step by step) :( ?

I am sorry but can you be more precise on what you mean by right extension. do you mean how to install extensions? how to install Yii or what extension to install?

Rights Extension for User Management… thanks for your fast replies :)

http://code.google.com/p/yii-rights/

http://yii-rights.googlecode.com/files/yii-rights-doc-1.2.0.pdf

Hey jay thanks for the link, I’ve read it so far, but there is a problem when I try to install…




00383:      * @return boolean whether the class has been loaded successfully

00384:      */

00385:     public static function autoload($className)

00386:     {

00387:         // use include so that the error PHP file may appear

00388:         if(isset(self::$_coreClasses[$className]))

00389:             include(YII_PATH.self::$_coreClasses[$className]);

00390:         else if(isset(self::$classMap[$className]))

00391:             include(self::$classMap[$className]);

00392:         else

00393:         {

00394:             if(strpos($className,'\\')===false)

00395:                 include($className.'.php');

00396:             else  // class name with namespace in PHP 5.3

00397:             {

00398:                 $namespace=str_replace('\\','.',ltrim($className,'\\'));

00399:                 if(($path=self::getPathOfAlias($namespace))!==false)

00400:                     include($path.'.php');

00401:                 else

00402:                     return false;

00403:             }

00404:             return class_exists($className,false) || interface_exists($className,false);

00405:         }

00406:         return true;

00407:     }



Could you give the solution ?

I’m not clear on what the problem you are experiencing is. Do you see an error message? if yes then post it

Yes… This the message, but I don’t know what the mean is this…




PHP Error


Description


include(User.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory



SOLVED :D

Welldone for solving the problem,

I have this problem, post the solution please???

You need to download and put the “User” extension under your app/protected/modules/user directory. By default, “modules” directory doesn’t exist, you must create it -or- decompress the User extension under your “protected” directory and it will create the neccesary subdirs.

Look at http://www.yiiframework.com/extension/yii-user

Best regards.-

NOTE: moved to proper forum

This is incorrect.

It was trying to load the User model. The Rights extension expects to find one. In its config it asks for the name of the user model, by default it’s User, and the name of the columns for id and username. This way it will work with any user authentication scheme already in place.