yii-user-management

Yii User Management Module
137 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.

Community

Yii-user-management is hosted at github: github.com/thyseus/yii-user-management

Donations are possible by bitcoin: 1AzhCYHrX7c7exBB89qfhbEvUaW6RThB1E

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

#12973 report it
Shahzad Thathal at 2013/04/24 02:35pm
Fatal error: Call to a member function get() on a non-object.

Hi there, Successfully installed yii user module but when click on login, http://localhost/yii_user_management/index.php/user/auth/login

Give this error,

Fatal error: Call to a member function get() on a non-object in D:\wamp\www\yii_user_management\protected\modules\user\models\YumUser.php

on line 374 and at line 374 this code:

$relations = Yii::app()->cache->get('yum_user_relations');

How can I fix this error?

#12836 report it
Deepan at 2013/04/15 08:51am
Facebook login

is there any pacth to integrate facebook login to yum

#12683 report it
kidata at 2013/04/05 04:23am
GitHub

@Bibi40k

I think if you open issues for this at github: https://github.com/thyseus/yii-user-management

your changes and suggestions will be recognized in development.

#12682 report it
Bibi40k at 2013/04/05 04:05am
temp solution for avatar

Seems like nobody is interested into this extension and this is not good.

there is a bug in YumAvatarController.php and even if the avatar is saved it does not report that so

if($model->save()) // does not activate

you can either comment out this if clause or change it to

if($model->save(false)) // and now is working fine

there's another problem i found. if someone change it's avatar, old one(s) remain on the server and because you don't have the possibility to choose between them it's waste of space. so there are 2 ways to solve this. you can either change the name of any new picture so it always overwrites existing one

$filename = Yum::module('avatar')->avatarPath .'/'.  $model->id . '_avatar.'. pathinfo($_FILES['YumUser']['name']['avatar'], PATHINFO_EXTENSION);

or when you upload a new one tell the action to remove the old one.

#12671 report it
Bibi40k at 2013/04/04 12:30pm
regarding the avatar issue

i only realized it checks the file then starts a new loop and because there is no data on the 2nd loop it stops at the 1st step

if(!$info)

please help

#12667 report it
Bibi40k at 2013/04/04 08:42am
[solved] create role error

i have found the error on line 29 in _form.php

<?php echp Yum::t('Higher is usually more worthy. This is used to determine downgrade possibilities.'); ?>

it is misspelled echo as echp

#12654 report it
Bibi40k at 2013/04/04 05:14am
problems i have

first of all thanks for your work.

as "admin": 1. when i hit "create new role" i get empty screen with no errors. 2. from "Manage profiles" if i try to delete a profile a popup message says "Error 404: The system is unable to find the requested action "delete"." (why is delete active in profiles if i can only remove users from "User administration"?) 3. "Last visit" should be set to "never" instead of 01-01-1970 :) i have changed in admin.php value to

'value'=>'$data->lastvisit == 0 ? "never" : date(UserModule::$dateFormat,$data->lastvisit)'

any user: 1. i activated "avatar", it works but if i change "public $avatarMaxWidth" from 0 to any other value when i try to upload any kind of accepted formats it says "The file "xx.jpg" is not an image." although it accepts the same image with 0 value. 2. also when i activate max value, on the form always appears "The image should have at least 50px and a maximum of 200px in width and height" no matter value i set so i change it in edit_avatar.php from 200 to

' . Yum::module('avatar')->avatarMaxWidth . '

3. in user menu in "Misc" appears "Upload avatar for admin" and "Change admin Password" no matter who is logged in so i changed in YumAdminMenu.php to "Change Password" and "Upload avatar"

please help me with avatar and roles

#12497 report it
DocSnyder at 2013/03/24 04:22am
Use something like this

realpath(Yii::getPathOfAlias('backend or www or frontend').DIRECTORY_SEPERATOR.'uploads')

#12284 report it
gb5256 at 2013/03/11 11:28am
Some more issues...

Hello, thanks for menting the role submodule. I have activated it and it is now working.

Next step is the avatar module. After enabling it, I have problems with the right path to setup as a avatar path. I am running on boilerplate, but the structure is the same, so within the www is a images folder. But yum is not accessing it. If I change the avatar path to something stupid, like ".." then it puts the file into the project root (as expected). But that means that the script is working. So I have my doubts about the path settings and the boilerplate. Does anybody has experience with yum and boilerplate?

thanks, gb5256

#12283 report it
thyseus at 2013/03/11 09:23am
adminIsGod

Make sure to have the 'role' submodule enabled in your config/main.php.

also try to append :

if(Yum::hasModule('role') && [...]

to line 29. I think this will fix it. This will go into github master. Thanks for reporting!

#12281 report it
gb5256 at 2013/03/11 09:05am
Installed latest GIT, some errors

Hi there, first of all: This is probably the best and most comlete extension out there for yii. Well done!

I have just installed the modules from the latest git into an othewise empty yii-app (I use the latest boilerplate). I can login and logout, so the basics are working. But when I try to access /user/user/admin/ wihtout beeing logged in I get this error:

Trying to get property of non-object
modules/user/components/YumWebUser.php(29)
Line 29 is: if(Yum::module('role')->adminIsGod && Yii::app()->user->isAdmin())

Any Ideas?

thanks for any hints, gb5256

#11567 report it
Helgi at 2013/01/21 03:50am
2thyseus - it was done

As intructed, I pointed to ?r=user/auth (and that IS the yum module - the error messages are from it). I tries to "hack" a bit and temporarily set in YumAuthController.php option to override password check

$identity->authenticate(true);

After that I was able to login but still cannot change password. It seems that there some errors in validatePassword or encrypt functions, but I cannot find it out. Sorry for my English.

#11565 report it
thyseus at 2013/01/21 03:25am
url route

Did you use the ?r=/user/auth url? you need to adjust the /site/login urls in the layouts/main.php of the testdrive demo application.

#11558 report it
Helgi at 2013/01/20 04:13pm
Default login/password not working

Just made a clean install to testdrive app, everything was fine, but when i tries to login as noticed in intructions admin/admin or demo/demo it returns with "Login is not possible with the given credentials" and "Login or Password is incorrect".

Tries on the last version 0.8. Looking for help! Thanks!

#11547 report it
thyseus at 2013/01/19 02:11pm
i will release a new "stable" version (0.8) soon

with long <?php tags for maximal compatibility and all the bugfixes and features of the stable github version.

#11544 report it
TonyBoy at 2013/01/19 10:28am
YUM on GitHub

Guys, be sure to use the last GitHub version !

#11536 report it
yiijco at 2013/01/19 05:16am
RE: Help

Re: Help thankyou skworden but too many bugs on it. sorry

#11506 report it
jbas at 2013/01/17 06:37am
I have extracted the user folder to protected/modules/

yes,I have extracted the "user" folder to protected/modules/

waiting your help..

#11504 report it
WebDevPT at 2013/01/17 05:36am
Extract dir

Have you extracted the files to protected/modules?

Note that it's not "models"!

#11503 report it
jbas at 2013/01/17 04:38am
throw exception "include(UserModule.php): failed to open stream: No such file or directory "

Hi experts, when I install this extension,my web app throw exception "include(UserModule.php): failed to open stream: No such file or directory",this is my config in main.php:

'import'=>array(
        'application.models.*',
        'application.components.*',
        'application.modules.user.models.*',
        'application.modules.srbac.controllers.SBaseController',
    ),
 
    'modules'=>array(
       'user' => array(
            'debug' => true,
        ),
      'Admin'=>array(  
                 'class'=>'application.modules.admin.AdminModule',  
        ),  
    ),
 
    'components'=>array(
         'user'=>array(
          'class'=>'application.modules.user.components.YumWebUser',
          'allowAutoLogin'=>true,
          'loginUrl' => array('//user/user/login'),
        ),

Leave a comment

Please to leave your comment.

Create extension