yii-user-management

User Management Module
93 followers

This is a modular User Management Module for easy integration in your Yii Framework Web Application.

It has the following features:

* An automated Installer
* User Administration
* Role Administration
* Permission System with a mixture of RBAC and ACL (see docs)
* Profiles & Profile history & Profile Comments & Profile Fields Administration
* Messaging System (send/receive Messages between Users) Submodule
* User groups (user can add new groups, other users can join)
* User Avatar upload
* User Registration
* Password Recovery
* Friendship system
* Mailing component (users can choose which messages he gets by email)
* Base Language: English 
* Complete Translations to german, french
* Almost complete Translation to spain thanks to bigchirv@gmail.com
* Incomplete Translations to russian and polish

What it is not:

* A complex RBAC like srbac. However, it is possible to use srbac together with the User Management Module without problems. The contributed Permission System may be powerful enough for your Web Application, just give it a try.

Documentation

Requirements

  • minimum of Yii 1.1.8 since DAO caching techniques are used

Installation

  • Extract the release file under protected/modules
  • Read docs/Install_tutorial.txt

  • Enjoy

Total 20 comments

#6662 report it
thyseus at 2012/01/26 06:56am
filtering by Role

It depends if you want to use the full ACL system provided by yum or only use roles.

If you use the ACL system, you can filter by the 'can' function, for example:

if(YumUser::model()->find('username = bob')->can('removeUsers')) { ...

} else { // he can´t }

or, if you want to check if the current logged in user can:

if(Yii::app()->user->data()->can('removeUsers')) { ... }

#6661 report it
Nicolas400 at 2012/01/26 06:42am
HOW to use this within accessRules Function

Hi, I'm using this extension. I use this to use within accessRules function.

array('allow', 
                'actions'=>array('generate'),
                'users'=>array('@'),
                'expression'=>'$user->hasRole("admin")'
                ),

I hardcoded the role, but is ok form me know !

#6655 report it
jorgediego at 2012/01/25 04:19pm
Great Work!

Despite the very tiny issues during installation I have to say that you have done a great work (in progress, though).

Keep coding!!

#6469 report it
AbuDayah at 2012/01/12 08:34am
First extension

I am junior yii developer, I'm like this extension.. it's really easy to installation and use

#5975 report it
dungdeveloper at 2011/12/02 01:38am
Intallation notes

When you logged in your app and run user/install, you will get error :

CWebUser and its behaviors do not have a method or closure named "data".

Just log out and install it again.

#5880 report it
ahmadthd at 2011/11/22 09:33am
pencil mystery solved....

if(you reach the step where you are logged in and finding pencil)

after you find that you cannot see the pencil... no problem.. follow as below logout FIRST and then use the link /index.php?r=user/auth instead. once logged in successfully retype the url of /index.php?r=user/auth

Stop looking for pencil you would not find it that easy. click Users on right hand side and then try to find it... the pencil. :)

#5762 report it
davidnewcomb at 2011/11/10 06:15am
Hurray

Found it! The login link is hard coded and the layout file doesn't match what the module expects.

Edit webapp/protected/views/layouts/main.php change line 34 from array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest), to array('label'=>'Login', 'url'=>array('/user/auth'), 'visible'=>Yii::app()->user->isGuest),

Phew!

#5761 report it
davidnewcomb at 2011/11/10 05:38am
Login page

I found my mystery "'update Icon' (the pencil)". You can only get too it from the new login page. After following the instructions the login link still points to: /index.php?r=site/login but if you point it too /index.php?r=user/auth then you get the correct login page which takes you through to the mystery pencil bit. Unfortunately, I don't know enough about how yii works to know how to change this.

#5756 report it
dickreuter at 2011/11/09 06:32pm
components not loaded

It says that in order to install it I need to overwrite the default Authentification Method in the Application Configuration:

'components'=>array( 'user'=>array( 'class' => 'application.modules.user.components.YumWebUser', 'allowAutoLogin'=>true, 'loginUrl' => array('//user/user/login'), ),

But for some reason this has absolutely no effect. It is as if Yii would completely ignore that I'm loading this component and changing the loginURL and it is still using the standard UserIdentity.php.

Any suggestions are appreciated.

#5700 report it
davidnewcomb at 2011/11/03 09:48pm
The missing link

Just installed 0.8rc5. In spite of the instructions being a bit broken everything went through pretty smoothly. I have one question about the instructions, can anyone give me the missing step between step 8 and step 9.

Step 8 talks about logging in as admin and Step 9 talks about changing the admin's password by clicking the "'update Icon' (the pencil)". After Step 8 there is no page with a pencil icon. I think the author has gone to a different page but there is no clue what it is! Can anyone tell me?

Thanks muchly

#5319 report it
TripleM at 2011/10/04 06:39am
create a link for every profile

Hi, first thing I want to thank you for your work .. second, I want to know how to create link for each user or each profile .. like this

www.mysite.com/username

in config/main.php

#5123 report it
Homan Huang at 2011/09/16 03:40am
Trying to get property of non-object

I check database that user has role has data. Don't know why it cannot extract the data. When I remark 354, I can login. Where can I fix it?

C:\inetpub\wwwroot\medappt\cmis\protected\modules\user\models\YumUser.php(354)

354 'roles' => array(self::MANY_MANY, 'YumRole', Yum::module('role')->userHasRoleTable . '(user_id, role_id)'),

#4971 report it
rashmani at 2011/09/02 06:34am
YUM UserModule.profileTable not defined

Hi thyseus,

I'm using YII 1.1.8, downloaded YUM yii-user-management_0.8rc5.tar.bz2 and started following the included install tutorial. When launching installer, I receive error: CException Property "UserModule.profileTable" is not defined

I'm trying to understand what's wrong but I'm wondering if anybody else had same problem or could help out.

Edit: I've also checked bug tracker, where this error is marked solved in r402; more, I do load module in my config/main.php. So, I'm trying with ver. 0.8rc5 now.

Edit&solution: yep, ver. 0.8rc5 solves it! :-):-):-) Thank you!

TIA, rash*

#4968 report it
windflaw at 2011/09/02 01:22am
install error

when I install the user module,something wrong: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.. The SQL statement executed was: CREATE TABLE IF NOT EXISTS user_group ( id int(11) NOT NULL AUTO_INCREMENT, owner_id int(11) NOT NULL, participants text NULL, title varchar(255) NOT NULL, description text NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

——I think PDO can't execute serial create table sentence,but how to fix it? thx!

#4950 report it
aztech at 2011/08/31 03:26pm
How can we help thyseus

Below comment is some kind of... confession. First time, a lot of bugs appears, was time when I joined project (release 0.4 or something around). At this time, this extension was quite simple and... working well. Unfortunately, to Thyseus, I appear. Young brain full of ideas. You know... I bring a lot of ideas that at the end was good but... for next two releases cause a lot of problems and... negative comments. On the other hand this extension is still above release 1.0, therefore you can assume (even expect) that a lot of aspects will be changing and sometimes something just not working. Sorry, this is a real project! It is complicated, has a lot of feature... and therefore may happen that they will not work (in some configuration)! I kindly ask you... if you have any problem which you can reproduce with blog application - please try and send! Believe me, this is so simple and can REALLY help to find out bugs. Moreover, your nervousness can be somehow... reassured :) P.S. If someone put negative comment and... with new release is happy is kindly aksed to update own feedback. P.P.S. I'm not involved, actively, into this extension any more

#4948 report it
pappleton at 2011/08/31 10:12am
Support

Debugging takes time and people should be patient. I only contributed one small bug fix. Its a great module - keep up the inspired work. Dont stop I want to see the masterpiece when released.

#4941 report it
thyseus at 2011/08/31 02:41am
Quality assurance

I do not feel anyone did get personal in the recent comments. On the other side, i also do not feel anyone did motivate me, except for one Person, that committed a lot of bug fixes into the google code svn repository. Working full-time on other projects, on which some use yii & yum, i dont have the time to be a 100% perfect, clean quality-assurance Team when packaging releases. Unfortunately such show-stopper bugs are always occuring :-(.

I hope a clean, working version will be released. Anyone interested please just join the google code svn repository, i can put you on the commit list, thank you.

Also: please ignore all wiki pages for now and follow the install instructions contributed in user/docs/install.txt - this is always the most recent. When a release is done and the installation process is clear, i will update the wiki pages (on google code and on yii framework extension pages)

#4940 report it
swisscheese at 2011/08/30 09:58pm
clarification

@stratosgear and @jasendorf don't get me wrong there is a reason to note broken code / enhancements / and so forth. There is no room to make personal attacks on someone trying to help the community. I would not put you guys in the front of the line there as doing so.

Personally I am still interested in this extension and got it working for me in one app by scaling down the included functionality and building it up from there for the custom purpose. Still saved me a ton of time even with reworking code.

In a couple of current projects I am using another ext from nickcv. Different approach and although not a 100% cookie cutter solution (as nothing will fit the bill for everyone 100% of the time) for my work it still saves a ton of time customizing to what will work for me. Instead of going after either one of these gracious developers I just decided to say thanks and use what I can use and build the rest and hopefully provide some good input when possible.

Like I said before constructive criticism is cool and respected, if you are capable of providing help even better, personal attacks are unnecessary.

I know first hand that thyseus has provided a lot to this community and it is cool to have people like that around to step up and try to help others out.

#4939 report it
jasendorf at 2011/08/30 09:33pm
I was harsh and for that I'm sorry

@swisscheese perhaps I was a bit harsh, but I think it should be noted that I have tried to do what I can. I've made very specific bug notes, I've made comments on the wiki pages hoping they'll be updated (it's not a real wiki so there's no way for a user to make the corrections), I've posted to the Yii facebook page that it would be nice to get a significant amount of people behind a reusable user management system and that YUM is the best thought through implementation I see.

But it was broken. I don't mean that in a mean way, or a snide way... not even an ungrateful way... it just was. Is it still? I don't know yet. The YUM Google Code feed is on the top of my RSS feeds. I saw a few days ago that a new release is out and I'll be putting it in ASAP because like I said before, it's the best there is!

@ismail I'd happily get more involved if you have the space for another developer... or documentor... or bottle washer... anything to help.

@swisscheese not sure if you've got some pull in the developer community, maybe you could help get some momentum behind this module? You might not like my comments, I don't really care for them myself now that I've re-read them, but can you help?

#4936 report it
stratosgear at 2011/08/30 07:41pm
RE: Like it or not

Although I generally agree with what swisscheese says here, I see the previous comments under a different perspective.

I have really tried to make the offered extension work, but it simply does not work as advertised. I tried debugging it and couldn't make it work. Maybe I was not good enough to fix it, I'm not trying to say that the code in unfixable.

The point, though, is that people express the impressions they got from the offered code. Apparently for many people it just didn't work. That should work as a warning to other people that might want to try out this extension. It's a shame to waste their time to try fix code that is not ready yet.

Although I applaud the generosity of the original author to share his work, there is nothing wrong with plenty of warnings on what someone is about the embark when trying to use this extension.

I ma following this thread on the hope that someday to code will be fixed and there will be two or three posters saying: "Yes, it works fine now." As long as I keep seeing these problems people keep having, I know that I should wait a little longer before trying again.

There is benefit in praise but there is equal (and sometimes more important) benefit in complaining.

Leave a comment

Please to leave your comment.

Create extension