[module] userGroups

i open this thread for comments and suggestions

you can find the module here

http://www.yiiframework.com/extension/usergroups/

if you need to report a bug do it in this thread or in the google code project page

http://code.google.com/p/yii-usergroups/issues/list

current release 1.5 dropped support for Yii 1.1.6, and only supports 1.1.7

nice extension

adjust models/files naming. in windows its case sensitieve :)

Groups

Cron

thx

thanks!

Weird, i was sure i always used the right case when loading class files.

Tomorrow i’ll run it on my case sensitive apache server and try it out.

Thanks a lot!

Hi,

extention looks good but install page is not loading, getting following error is anyone will help me?

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

192.168.1.98

3/31/2011 5:14:12 PM

Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

right… i was just thinking about that… in the install instruction i made an assume that you were actually using urlManager with showScriptName setted to false and an .htaccess file

if you are not using .htaccess to get reed of index.php from your urls but you are still using urlManager this is the address where you are supposed to go:

yourapplication/index.php/userGroups

otherwise if you don’t even have url manager active you are supposed to use the standard url definition that yii provides.

sagarneo11 i just added the instructions on how to enable urlManager inside the module page, use those.

if you still have some troubles let me know!

Yes following code worked thank you again


		// uncomment the following to enable URLs in path-format

			'urlManager'=>array(

			'urlFormat'=>'path',

			'rules'=>array(

			  '<controller:\w+>/<id:\d+>'=>'<controller>/view',

			  '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

			  '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

			),

			'showScriptName'=>false,

		),



Declaration of WebUserGroups::changeIdentity() should be compatible with that of CWebUser::changeIdentity()

Hi, you seems to have built a very nice app here. Unfortunately for me i am having a few issues installing it. I get to the app installation page by typing "baseapp(DOT)local(slash)userGroups" and it appends the (slash)install. I continue to read instructions in install page and once i think everything is ok i enter my accessCode. I am then taken to the form for the root user which i fill in and on submition i get his error

  • include(UsergroupsCron[.]php): failed to open stream: No such file or directory

If i check the database i see 6 table have been created. but the only the usergroups_configuration table has records the other 5 are empty including the usergroups_user table. see error attached.

thanks for your help and once again, from documentation, this app look good.

1485

Screenshot-1.png

1486

Screenshot-2.png

1487

Screenshot-3.png

the problem is i need to pass more arguments to the method so i don’t see how to keep it compatible.

i could still pass the extra argument and use get arguments inside the changeidentity method but it would lose readability

thanks for the bug report!

i’m testing everything on a no case sensitive file system, so i don’t really get to spot those errors.

anyhow i’ll make a new release right now, thanks again!

before running again the installation process delete the db tables created by the previous one

Thanks for the fix, its working great (well its passed the place i got the error and i have logged in for the first time). testing it now…

keep me updated :D

Nice extension!

bug report:

On page ‘Root tools’ ajax links ‘add group’ and ‘add user’ not work.

Original code:




// ../modules/userGroups/views/admin/groups.php, row 19

<?php

if (Yii::app()->user->pbac('userGroups.admin.admin'))

        echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add group'), '/userGroups/admin/accessList?what='.UserGroupsAccess::GROUP.'&id=new', 

	array('success'=>'js: function(data){ $("#group-detail").slideUp("slow", function(){ $("#group-detail").html(data).slideDown();}); }'));

?>


//  ../modules/userGroups/views/admin/users.php, row 28

<?php

if (Yii::app()->user->pbac('userGroups.admin.admin')) 

	echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add user'), '/userGroups/admin/accessList?what='.UserGroupsAccess::USER.'&id=new', 

	array('success'=>'js: function(data){ $("#user-detail").slideUp("slow", function(){ $("#user-detail").html(data).slideDown();}); }'),

	array('id'=>'new-user-'.time()));

?>



My solution:




//  ../modules/userGroups/views/admin/users.php

<?php

if (Yii::app()->user->pbac('userGroups.admin.admin')){	

	echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add group'), 

	Yii::app()->createUrl('/userGroups/admin/accessList', array('what'=>UserGroupsAccess::GROUP, 'id'=>'new')), 

	array('success'=>'js: function(data){ $("#group-detail").slideUp("slow", function(){ $("#group-detail").html(data).slideDown();}); }'));}

?>


//  ../modules/userGroups/views/admin/users.php

<?php

if (Yii::app()->user->pbac('userGroups.admin.admin')) 

	echo CHtml::ajaxLink(Yii::t('userGroupsModule.admin', 'add user'), 

	Yii::app()->createUrl('/userGroups/admin/accessList', array('what'=>UserGroupsAccess::USER, 'id'=>'new')), 

	array('success'=>'js: function(data){ $("#user-detail").slideUp("slow", function(){ $("#user-detail").html(data).slideDown();}); }'),

	array('id'=>'new-user-'.time()));

?>



extension version: userGroups-1.6.2

thanks for the bug report Petar ^^

i’ll make the correction tomorrow morning along a few others i have to.

Hi,

Just installed Usergroups on a completely empty project and got the following error (which I notice has been mentioned before)

I’m using yii 1.1.7 and userGroups 1.6.5.

I notice the following quote in the Docblock for CWebUser changeIdentity

could this have something to do with it??

Dave

Bad form to reply to own post but I’ve found the answer.

PHP reports this error if E_STRICT error reporting is switched on. It was reported as a bug (#46851) back in 2008 but is still knocking around

Dave

Hi,

As a newbie I’m probably trying to run before I can walk but I’m trying to add a profile extension and I get the following error:

this is caused by line 28 of protected\modules\userGroups\views\user\_view.php which is:

I’ve created a table called usergroups_userdata and it’s associated model; copied the public function profileViews() verbatim from the instructions into the model; created a view file ‘index.php’ in protected\views\usergroups_userdata and have added the ‘profile’ line to the usergroups configuration (which if commented out allows userGroups to run fine).

Yii 1.1.7, UserGroups 1.6.5, PHP 5.3.6

Help please

Dave

please copy your model into paste bin and post here the link so i can check it out ^^

Hope this is what you want. zipped up model attached

Thanks

Dave

ok found the problem, thanks Dave_D ^^

i’ll release a bugfix within today.

what’s going on is that the module use the tableName to get the view directory, and is not taking count of the { }