Yii Framework Forum: [module] userGroups - Yii Framework Forum

Jump to content

  • (10 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[module] userGroups module for managing user, groups and their permissions Rate Topic: -----

#41 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 20 May 2011 - 03:17 AM

@Dave_D

data stored into profile's tables are not stored in session on this version.

Getting the session too big is not ever a good thing, anyhow on next release i might make available the choice to store some of the profile's data in session.
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#42 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 20 May 2011 - 03:46 AM

Hi Nickcv

Quote

Getting the session too big is not ever a good thing, anyhow on next release i might make available the choice to store some of the profile's data in session.


Thanks for considering this, can I also make another enhancement request. I use the YiiMail extension (a wrapper for swiftmail) and it would be great if I could use it with UserGroups, how about making the mailer selectable with a config option (similar to the mailmessages option)

Thanks

Dave
0

#43 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 20 May 2011 - 04:36 AM

sure, i'll take a look at it.

Anyhow i won't be able to make another release until next week due to working schedule.
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#44 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 20 May 2011 - 04:52 PM

Hi Nickcv,

Found problem in 1.6.8 that gets reported if E_STRICT error reporting is switched on, nothing happens when clicking on Root Tools. The following error message is raised.

Quote

Only variables should be passed by reference


caused by line 40 of crons.php

Quote

'value'=>'array_shift(explode(" ",$data->last_occurrence))',


The error report can be suppressed by appending @ to the line, i.e.

Quote

'value'=>'@array_shift(explode(" ",$data->last_occurrence))',


but I'm not sure if the line then runs properly.

but this works ok

Quote

'value'=>'substr($data->last_occurrence,0,strpos($data->last_occurrence," "))',


Dave
0

#45 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 21 May 2011 - 05:01 AM

Hi Nickcv,

Nitpicking but can I suggest that on install (for Mysql) the definition of the table collation is left to the database default.

i.e in InstallController.php on line 338 remove <CHARACTER SET=latin1> for the usertable (which is the only table where you define a character set).

Dave
0

#46 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 21 May 2011 - 01:07 PM

Something else on 1.6.8 that doesn't like E_STRICT error reporting

The Add Group & Add User links don't work on the Root Tools page. They generate the following error.

Quote

Non-static method UserGroupsAccess::infoButton() should not be called statically (\protected\modules\userGroups\models\UserGroupsAccess.php:224)


Changing the declaration on line 239 to

Quote

private static function infoButton($permissionControl, $mode)


fixes it.

Dave
0

#47 User is offline   KRR 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 17-March 09

Posted 22 May 2011 - 01:42 PM

Thanks Dave for posting these fixes, you saved me for many hours of searching....
0

#48 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 23 May 2011 - 02:43 AM

@Dave_D sure no problem and thanks for the reports... i'm testing everything under E_ALL and with no E_STRICT enabled, i'll had those fixes as well with next release.
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#49 User is offline   Aleks B 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 23-May 11
  • Location:Chicago

Posted 23 May 2011 - 02:31 PM

Nick -

Is there a way to extend this module to use OpenLDAP as the db, vs. creating one's own?

Regards,

Aleks
0

#50 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 25 May 2011 - 05:36 AM

@Dave_D
i just released a new version with the Profile Extension's feature you asked for.
i also made some corrections to the errors popping out with E_STRICT

@Aleks B
i have no experience with LDAP, but i can i tell you that what userGroups is doing on installation is checking the db to see if there are the tables it needs.

You can probably tweak the installation mechanism to make it work with LDAP, but you may experience several problems because the ROOT user is defined by a constant ID.
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#51 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 25 May 2011 - 05:37 AM

@Dave_D
almost forgot, i couldn't find the yiimail extension, so i couldn't make any teaks to the module to make it work with it.
where did you find it?
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#52 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 25 May 2011 - 09:06 AM

Nickcv,

Quote

i just released a new version with the Profile Extension's feature you asked for.


How do I use it? :huh:

Quote

almost forgot, i couldn't find the yiimail extension, so i couldn't make any teaks to the module to make it work with it.
where did you find it?


here mail extension

Thanks for all the work you're doing on this - it's much appreciated :)

Dave
0

#53 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 25 May 2011 - 09:59 AM

it's explained in the updated documentation ^^

anyhow you just need to implement a new method inside your Profile Extension's model:

Quote

How can I store Profile Extension's data in session?

You simply need to implement on more method inside your Profile Extension model:
/** 
 * returns an array that contains the names of the attributes that will 
 * be stored in session 
 * @return array 
 */ 
public function profileSessionData() 
{ 
    return array( 'attribute_name', ); 
}

To load that data you'll simply use this line of code:
Yii::app()->user->profile('MODEL_CLASS_NAME', 'ATTRIBUTE_NAME');
ie:
Yii::app()->user->profile('UserHobbies', 'hobby');


thank you for the support ^^
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#54 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 25 May 2011 - 10:21 AM

ops, i uploaded the wrong tar, sorry guys... i just uploaded the right one ^^
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#55 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 25 May 2011 - 04:52 PM

Hi Nickcv,

Using 1.7 get error on logging out

Quote

WebUserGroups does not have a method named "getRecovery".


I created the following function in WebUserGroups which clears the failure but I'm not sure if it's the right thing to do

public function getRecovery() {
 	return $this->getState('__recovery');
}


Dave
0

#56 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 26 May 2011 - 06:30 AM

i should totally stop coding at night <.< how the hell did it disappear?
thanks anyway
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#57 User is offline   Dave_D 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 28-April 11
  • Location:Surrey, England

Posted 26 May 2011 - 11:08 AM

HaHa

You're welcome
0

#58 User is offline   Nikita. 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 27-May 11

Posted 27 May 2011 - 05:14 AM

Hi Nickcv,

Thanx for this nice extension.

I have a little problem. I'm trying to add a profile extension and the ability to register users, but I can't do it.
This problem has already been Dave_D:

I've created a table "user" and model "User" from gii;
copied the public function profileViews() verbatim from the instructions into the model;
Created controller and views files from GRUD to protected\views\user

But when I go to the page "localhost/Yii/www/userGroups/index" , I can see only:
"Error 404
Unable to resolve the request "userGroups/index"."

=)

My model User in Attachments:

Attached File(s)

  • Attached File  User.zip (1.05K)
    Number of downloads: 8

0

#59 User is offline   nickcv 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 154
  • Joined: 23-November 10

Posted 27 May 2011 - 05:30 AM

@Nikita

hi ^^
userGroups/Index is not an existing path
just do userGroups/ without the index

to enable user registration you have to set that configuration value inside the Root Tools
sometimes it's just like teaching pigs how to fly

Posted Image
Posted Image looking for some invite keys? welcome on B4K!
0

#60 User is offline   Nikita. 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 27-May 11

Posted 27 May 2011 - 05:57 AM

View Postnickcv, on 27 May 2011 - 05:30 AM, said:

to enable user registration you have to set that configuration value inside the Root Tools

ouch! I find this in configuration page. Thanx.

View Postnickcv, on 27 May 2011 - 05:30 AM, said:

userGroups/Index is not an existing path
just do userGroups/ without the index


nickcv, what I need to do to the data derived from model "User" to views %protected/views/user/*
0

Share this topic:


  • (10 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users