[module] userGroups

you’ll see that data inside every profile

if you are already logged-in when you go at the address userGroups/ your own profile is displayed.

your view will be loaded inside the profile automatically

UserGroupsUser::VIEW views will be loaded inside the profile (yourapp/userGroups/ or yourapp/userGroups?u=USERNAME)

UserGroupsUser::UPDATE views will be loaded when you edit a profile (yourapp/userGroups/user/update/id/NUMBER can be just loaded via ajax requests)

UserGroupsUser::REGISTRATION views will be loaded on the registration view (yourapp/userGroups/user/register )

Hi!

Very helpfull module!

But…

I have an issue with Profile Extention:

All done with docs (table with ug_id, profileViews, profile in main), extention were generated by gii.

If i go to /profile_extention - all works fine.

But now dont work profile’s pages:

link “My Profile” just doesn’t work at all;

if i go from “User list” to user’s name link - there is exception


UserController cannot find the requested view "//user_profile/index".

After i changed path to my extention in _view.php other exception falls:




The "dataProvider" property cannot be empty.


...framework\zii\widgets\CBaseListView.php(103)



What’s wrong with me?

Thanks in advance, nickcv!

hi veluroff ^^

the profile views must stay in a folder named after the database table name.

in your case they are supposed to stay in a directory named "user_profile"

so:

/protected/views/user_profile/

So in that case the same exception (the last one i’ve noticed) is generated :mellow:

update: I’ve tried before that naming of folder, but without success: userGroups/views/user/_view.php can see the view file of profile extension, after that exception “dataProvider” is raised.

Nick, could You show me the right direction?

the folder should be named user_profile, not just user…

that’s what i get from the error you are getting… to give you more help i’d need to see your model file and the directory tree of your views

Hi, Nick!

Here is a listing of views directory:

protected\views\layouts\column1.php

protected\views\layouts\column2.php

protected\views\layouts\main.php

protected\views\site\contact.php

protected\views\site\error.php

protected\views\site\index.php

protected\views\site\login.php

protected\views\site\pages\about.php

protected\views\site\pages\register.php

protected\views\user_profile\_form.php

protected\views\user_profile\_search.php

protected\views\user_profile\_view.php

protected\views\user_profile\admin.php

protected\views\user_profile\create.php

protected\views\user_profile\index.php

protected\views\user_profile\update.php

protected\views\user_profile\view.php

Profile’s model in attachment.

Hi Nick!

Now profile extension works fine.

What’s done:

  1. some adjustments (re-init dataProvider, full path for profile views and so on)

  2. most important thing: i had almost all problems because i’ve installed profile extension AFTER start using users; i.e. i had users in UserGroupsUser model (table) and after that tried setup extension with empty table. That’s my general mistake. After i filled profile ext table with proper ‘ug_id’ - all works now.

Thanks again for module, Nick!

you are welcome veluroff ^^

sorry again if i coulnd’t give you much help right now… i’ve been extremely busy, but thanks again for your support ^^

Hi nickcv,

I set up this extension but that was only after I loaded it on a clean yiic build. For my projects I use a different directory structure than the default which created too many problems with the install.

I have a couple of questions though.

I can not use


'caseSensitive'=>false,

in the urlManager.

Also wondering if there is a master switch for captcha to turn it on and off? I did not see anything obvious. Is there plans for such?

Overall I am very impressed with this extension and I am in the process of rolling it into an app to test things out.

i’ll take a look at caseSensitive, i didn’t test against that option

right now there’s no switch for the captcha, i didn’t think that someone might have wanted to turn it off :P

i’m sorry if i didn’t give you a response any sooner, i’ve been pretty busy last week cause i just moved to another company.

thanks a lot for your support :D

Thanks. I have found that turning captcha on and off helps during development but also there are many apps that don’t require it, but could still benefit from this extension, so of course it is nice in those situations too.

Even without a switch for it I am liking this extension.

Hi all.

It’s the first time that I use this extension…

Can I associate more groups to one user? I can’t find how to do that… :expressionless:

Hey,

i tried installing the module. I followed the installation instructions given in the documentation. But still i’m gettig the error object not found!!

The following is my config/main.php


<?php


// uncomment the following to define a path alias

// Yii::setPathOfAlias('local','path/to/local-folder');


// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

return array(

	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',

	'name'=>'Yii Blog Demo',

	'theme'=>'starwarrior',


	// preloading 'log' component

	'preload'=>array('log'),


	// autoloading model and component classes

	'import'=>array(

		'application.models.*',

		'application.components.*',

	),


'modules'=>array(

		// uncomment the following to enable the Gii tool

		

		 'userGroups'=>array( 'accessCode'=>'type here your access code',

),

		 ),


	'defaultController'=>'post',


	// application components

	'components'=>array(

		'user'=>array(

			// enable cookie-based authentication

			'allowAutoLogin'=>true,

		),

		'db'=>array(

			'connectionString' => 'sqlite:protected/data/blog.db',

			'tablePrefix' => 'tbl_',

		),

		// uncomment the following to use a MySQL database

		/*

		'db'=>array(

			'connectionString' => 'mysql:host=localhost;dbname=blog',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => '',

			'charset' => 'utf8',

			'tablePrefix' => 'tbl_',

		),

		*/

		'errorHandler'=>array(

			// use 'site/error' action to display errors

            'errorAction'=>'site/error',

        ),

        '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,


        ),

		'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error, warning',

				),

				// uncomment the following to show log messages on web pages

				/*

				array(

					'class'=>'CWebLogRoute',

				),

				*/

			),

		),

	),


	// application-level parameters that can be accessed

	// using Yii::app()->params['paramName']

	'params'=>require(dirname(__FILE__).'/params.php'),

);

I’ve added the htaccess file in the root and the userGroup in modules directory. My url is http://server/testyii/demos/blog/index.php/userGroups.

Thanks

@ningia

at the moment i’m not supporting multiple groups per user, but i’ll consider it as a feature for the next release :D

@mithilia

you have to tell me exactly what error you are getting otherwise i won’t be able to help you out

Depending on how granular one wants to get levels can be used to allow a user to be part of multiple groups. Although it might be a little more work, I think the same objective can be achieved with the current extension. I have not done this yet but that was my plan when the time comes…unless I just misunderstood the capabilities of the extension.

I get the following error

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

server

7/6/2011 10:13:11 AM

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

Thanks

Hey,

i fixed the problem… My url was wrong.

thanks

Is the next release already planned?

The release is planned for this month, but i don’t know yet if i’ll be able to add that feature in the milestone

Hi,

I’m a brazilian, sorry my bad english.

I have installed and i’m using normaly. my question is…

How i use the access rules registered in ROOT TOOLS without “function accessRules()” in controllers ?????