[Module] Yii User Management Module

@thyseus: svn/trunk is not working for me right now. I’ve just checked out rc5 and it’s good to go.

@xgenvn Thanks for the feedback. @thyseus I’ll also check the uploaded zip tomorrow

I had the exact same issue, but then I found these directions (code.google.com/p/yii-user-management/wiki/InstallationInstructions) and saw the part I was missing - cacheing.

Set a caching component

Make sure to set a caching component. Yum relies on it. If you do not want to cache, add

[font=“Courier New”] ‘components’ => array(

                    'cache' => array('class' => 'system.caching.CDummyCache'),[/font]

to your config/main.php.

Also see www.yiiframework.com/doc/guide/1.1/en/caching.overview about some general information about caching in yii.

hi i m new to yii. and its my first time installing yii-user-management extension.

everything went well until the instructions where it says click on "administrate your users"

when i click on it and login as admin the next page display an error

i configured the dummy cache as instructed.

can anybody help me please. i m not sure what went wrong.

thanks for this great extension

The zip file has been extracted in /modules/user/user however the instructions and the svn checkout check the files out into /modules/user/.

To solve your problem move /modules/user/user/ up one directory.

Although this will get you through the installer etc. I’m not confident this plugin is functioning correctly. I don’t seem to be able to retain a logged in state. Going through the code now to try and find out why.

Edit:

To update, I can successfully login and if I stop the redirects in the redirectUser function in the YumAuthController I can see the admin menu like I guess I’m supposed to. But the moment one of the redirects fire I’m logged out again. Not sure why this is, any help would be greatly appreciated.

Edit: Fixed.

‘session’ => array(

        'sessionName' => 'Site Session',


        'class' => 'CHttpSession',


        'autoStart' => true,


    ),  

The space between "Site Session" was causing the problem. Removed the space and everything is working.

For those interested I’ve written a step by step guide on to set this module up.

http://alanhollis.com/yii-installing-yii-user-management-module/

After several false starts, I’ve gotten YUM 0.8rc6 installed and operational. I’m in the midst of trying to adapt it to use a custom profiles table, but that’s a story for another day.

I discovered that the last three tables specified at the end of /docs/fresh_installation.sql did not get installed: user_has_role, user_has_usergroup, and yumtextsettings. I already know that yumtextsettings is needed, and I’ve created it manually from that portion of the SQL file. It looks to me as if user_has_role is actually now called user_role, and that did get created.

That leaves user_has_usergroup, for which I don’t see an equivalent in my database. Will I run into problems later if I don’t create this now? If so, what is its proper name, structure, and alias (for the modules array in /config/main.php)?

Thanks!

We need to update the documentation (again). Usually docs are a little bit lagged from the current development changes.

All tables named has are no longer required since we changed their names several weeks ago (I made that change). In the particular case of user_has_usergroup the table is no longer required since the user grouping code was removed. I think yumtextsetting is no longer used anymore.

As usual, @thyseus, correct me if I’m wrong.

Long story short, your system will not blow up if you don’t create the user_has_usergroup table. YUM should work OK with the tables created from the web installation wizard.

Thanks for the quick reply, chirvo. Actually, yumtextsettings is required by the registration module. That’s where it gets the message for the registration activation email. I got an error at that stage in the registration process before I created the table. It looks as if other potentially important messages are stored there too, but I haven’t yet tested the functions that would use them (e.g. password reset, friendship request, membership payment).

chirvo: everything you said is100% correct .

YumTextSettings will also get removed. It is a very bad style. It’s up to you where you get the text from (cms, hardcoded in php, whatever) in the recent versions.

Sorry for all the inconvinience that comes from outdated docs. Thats always the problem with projects that are still in development.

I tried to use the invitation form is, and I get the following error:

could someone help me?

Hi,

I am newbie in Yii. I found User management extension and I wanted to use it. I followed all steps given for installation but I am getting one warning.

Warning : PDO::__construct() [<a href=‘pdo.–construct’>pdo.–construct</a>]: [2002] Invalid argument (trying to connect via unix://)

I am not getting installation page. Please suggest me what is the problem.

Thank You

Hi,

After I create a dropdownlist profile field and try to add a new user I get this error:

include(<name.of.the.profile.field.I.created.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

I noticed it creates an INIT entry in the database instead of creating an ENUM.

How can I fix this so I can add dropdownlist profile fields?

Hello guys,

Thanks for the wonderful plugin.

I managed to install it correctly (I think).

But when I follow


mydomain/user/auth

in order to login. I was able to log in using admin:admin successfully and redirected to the homepage instead of the administration page.

I do not know the link for the administration page or profile page in order to manually get there.

Any suggestions?

You can set the ‘returnAdminUrl’ to array(’//user/user/admin’) (config/main.php),

then you willbe automatically redirected to the user administration overview.

Set ‘returnUrl’ to the url where normal users should be redirected after Login.

Thanks Thyseus.

I managed to find it. Can you please provide me a link to the registration form? Found the registration form as well. I love this plugin. It is getting better and better.

Finally another 2 problems1 problem:


CException


Property "UsergroupModule.usergroupTable" is not defined.


/var/www/yii/framework/base/CModule.php(483)


471         }

472     }

473 

474     /**

475      * Configures the module with the specified configuration.

476      * @param array $config the configuration array

477      */

478     public function configure($config)

479     {

480         if(is_array($config))

481         {

482             foreach($config as $key=>$value)

483                 $this->$key=$value;

484         }

485     }

486 

487     /**

488      * Loads static application components.

489      */

490     protected function preloadComponents()

491     {

492         foreach($this->preload as $id)

493             $this->getComponent($id);

494     }

495 

and secondly how can I enable avatars for users?

Fixed the issue with the avatars. Thanks a lot

Thanks again for the wonderful plugin.

George

I found a bug in registration.

If a user tries to register and the message module is not enable, then an activation email cannot be sent.

This happens because:

YumMailer.php uses:


Yum::module('message')->adminEmail

Changed it to:


Yii::app()->params['adminEmail']

And everything works.

Thats nice. Every problem solved automatically. Now, THATS fun being a supporter :slight_smile:

yii-user-management moved to github:

Please let us all use the github issue tracker system for future discussion.

When a new stable - i mean really stable version will be released, i open

up a new announcement thread, since nobody will need&read this 23 pages anymore…

Cool. Now, what about us the happy coders that use to commit code to YUM? :)