Yii Framework Forum: [Module] Yii User Management Module - Yii Framework Forum

Jump to content

  • (30 Pages)
  • +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[Module] Yii User Management Module Discussion, Bug Reports and Feature Requests for the User Management Rate Topic: ***** 5 Votes

#121 User is offline   thammu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 04-October 09

Posted 31 August 2010 - 09:26 AM

View Postthammu, on 31 August 2010 - 07:35 AM, said:

I get the following error when I try to login:

Error 500
Property "YumSettings.registrationType" is not defined.


looks like you have introduced a new field registrationType in some table, but unfortunately the data folder is missing in r135 folders.
0

#122 User is offline   thammu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 04-October 09

Posted 31 August 2010 - 09:40 AM

View Postthammu, on 31 August 2010 - 09:26 AM, said:

looks like you have introduced a new field registrationType in some table, but unfortunately the data folder is missing in r135 folders.

settingsTable looks to have changed!?

Pl. include the data folder in svn.
0

#123 User is offline   thammu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 04-October 09

Posted 31 August 2010 - 10:13 AM

../user/install is not working in r135. data folder is needed.
0

#124 User is offline   thammu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 04-October 09

Posted 03 September 2010 - 09:04 AM

r136

../user/install still doesn't work.

You get the following error:


Error 500

Property "YumSettings.registrationType" is not defined.

exception 'CException' with message 'Property
"YumSettings.registrationType" is not defined.' in
D:\xampp\htdocs\myWebFolder\blog\framework\base\CComponent.php:131
Stack trace:
#0
D:\xampp\htdocs\myWebFolder\blog\framework\db\ar\CActiveRecord.php(110):
CComponent->__get('registrationTyp...')
#1
D:\xampp\htdocs\myWebFolder\blog\protected\modules\user\UserModule.php(175):
CActiveRecord->__get('registrationTyp...')
#2 D:\xampp\htdocs\myWebFolder\blog\framework\web\CController.php(255):
UserModule->beforeControllerAction(Object(YumInstallController),
Object(CInlineAction))
#3
D:\xampp\htdocs\myWebFolder\blog\framework\web\CWebApplication.php(324):
CController->run('')
#4
D:\xampp\htdocs\myWebFolder\blog\framework\web\CWebApplication.php(121):
CWebApplication->runController('user/install')
#5 D:\xampp\htdocs\myWebFolder\blog\framework\base\CApplication.php(135):
CWebApplication->processRequest()
#6 D:\xampp\htdocs\myWebFolder\blog\index.php(11): CApplication->run()
#7 {main} REQUEST_URI=/myWebFolder/blog/index.php/user/install
0

#125 User is offline   thammu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 04-October 09

Posted 03 September 2010 - 09:26 AM

r134 behaviour for the following url:

http://localhost/myW...hp/user/install



contrast it with r135 and r136 in the next post

Attached File(s)

  • Attached File  r134.JPG (149.85K)
    Number of downloads: 30

0

#126 User is offline   thammu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 04-October 09

Posted 03 September 2010 - 09:27 AM

r135 (and r136) behaviour for the following url:

http://localhost/myW...hp/user/install

Attached File(s)

  • Attached File  r136.JPG (115.16K)
    Number of downloads: 24

0

#127 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 03 September 2010 - 09:39 AM

please remove the table 'settings' in your database, and re-run installer. this error occures because a settings table is available and yum tries to apply this settings to the Module configuration - before he arrives at the actionStart() of YumInstallController. Will fix this for next revision. removing the settings table manually should do it, too.

edit: fixed this in svn, rev137, please try it ;)
0

#128 User is offline   thammu 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 55
  • Joined: 04-October 09

Posted 03 September 2010 - 10:35 AM

View Postthyseus, on 03 September 2010 - 09:39 AM, said:

please remove the table 'settings' in your database, and re-run installer. this error occures because a settings table is available and yum tries to apply this settings to the Module configuration - before he arrives at the actionStart() of YumInstallController. Will fix this for next revision. removing the settings table manually should do it, too.

edit: fixed this in svn, rev137, please try it ;)


Thanks r137 crosses the first hurdle, but on registration.... (Where is 'header_email_registration' field in the tbl_YumTextSettings ?)

Error 500

Property "YumTextSettings.header_email_registration" is not defined.


"YumTextSettings.header_email_registration" is not defined.' in
D:\xampp\htdocs\myWebFolder\blog\framework\base\CComponent.php:131
Stack trace:
#0
D:\xampp\htdocs\myWebFolder\blog\framework\db\ar\CActiveRecord.php(110):
CComponent->__get('header_email_re...')
#1
D:\xampp\htdocs\myWebFolder\blog\protected\modules\user\controllers\YumRegistrationController.php(114):
CActiveRecord->__get('header_email_re...')
#2
D:\xampp\htdocs\myWebFolder\blog\protected\modules\user\controllers\YumRegistrationController.php(72):
YumRegistrationController->sendRegistrationEmail(Object(YumUser))
#3
D:\xampp\htdocs\myWebFolder\blog\framework\web\actions\CInlineAction.php(32):
YumRegistrationController->actionRegistration()
#4 D:\xampp\htdocs\myWebFolder\blog\framework\web\CController.php(300):
CInlineAction->run()
#5
D:\xampp\htdocs\myWebFolder\blog\framework\web\filters\CFilterChain.php(129):
CController->runAction(Object(CInlineAction))
#6 D:\xampp\htdocs\myWebFolder\blog\framework\web\filters\CFilter.php(41):
CFilterChain->run()
#7 D:\xampp\htdocs\myWebFolder\blog\framework\web\CController.php(1049):
CFilter->filter(Object(CFilterChain))
#8
D:\xampp\htdocs\myWebFolder\blog\framework\web\filters\CInlineFilter.php(59):
CController->filterAccessControl(Object(CFilterChain))
#9
D:\xampp\htdocs\myWebFolder\blog\framework\web\filters\CFilterChain.php(126):
CInlineFilter->filter(Object(CFilterChain))
#10 D:\xampp\htdocs\myWebFolder\blog\framework\web\CController.php(283):
CFilterChain->run()
#11 D:\xampp\htdocs\myWebFolder\blog\framework\web\CController.php(257):
CController->runActionWithFilters(Object(CInlineAction), Array)
#12
D:\xampp\htdocs\myWebFolder\blog\framework\web\CWebApplication.php(324):
CController->run('')
#13
D:\xampp\htdocs\myWebFolder\blog\framework\web\CWebApplication.php(121):
CWebApplication->runController('user/registrati...')
#14 D:\xampp\htdocs\myWebFolder\blog\framework\base\CApplication.php(135):
CWebApplication->processRequest()
#15 D:\xampp\htdocs\myWebFolder\blog\index.php(11): CApplication->run()
#16 {main} REQUEST_URI=/myWebFolder/blog/index.php/user/registration
0

#129 User is offline   pingala 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 14-July 10
  • Location:Dublin, Ireland

Posted 10 September 2010 - 05:59 AM

Hi,

I'm using this module for my application, one of my requirements is to have the three forms for login/password recovery/registration all in one page in separated TAB.

The landing page with all forms is located at http://localhost/myA....php/user/login the two forms (login and password recovery) are as follow in the rendered html.

<div class="tab-content" id="tab1"> 
 <form id="login-form" action="/myApp/index.php/user/login" method="post">                                     
  <fieldset>
   <label for="UserLogin_username" class="required">Username <span class="required">*</span></label>                                		        
   <input name="UserLogin[username]" id="UserLogin_username" type="text" value="" />
 
   <label for="UserLogin_password" class="required">Password <span class="required">*</span></label>
   <input name="UserLogin[password]" id="UserLogin_password" type="password" value="" />                                    
 
   <input id="ytUserLogin_rememberMe" type="hidden" value="0" name="UserLogin[rememberMe]" />
   <input name="UserLogin[rememberMe]" id="UserLogin_rememberMe" value="1" type="checkbox" /> Remember Me
  
   <input class="button" type="submit" name="yt0" value="Sign In" />                                    
  </fieldset>                                    
 </form>         
</div>
<div class="tab-content" id="tab2"> 
 <form id="forgot-password-form" action="/myApp/index.php/user/recovery" method="post">                                 
  <fieldset> 
   <label for="UserLogin_username" class="required">Username <span class="required">*</span></label>
   <input name="UserLogin[username]" id="UserLogin_username" type="text" value="" />
   <input class="button" type="submit" name="yt1" value="Restore" /> 
  </fieldset>                                    
 </form>   
</div>


When I fill out the password recovery form with a wrong username and I hit the Restore button I get simply redirected to http://localhost/myA...p/user/recovery which contains nothing (I've taken out the view for the recovery controller). What I want is that the controller will reload the login form, bringing the focus on the
recovery tab (tab number 2) with the proper error message in it.

this is the php code in the login.php view:
 <div class="tab-content default-tab" id="tab1"> 
 <?php echo CHtml::errorSummary($model,'<a href="#" class="close"><img src="'.Yii::app()->request->baseUrl.'/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a><div>','</div>',array('class'=>'notification error png_bg')); ?>  

 <?php echo CHtml::beginForm(Yii::app()->getModule('user')->loginUrl,'post',array('id'=>'login-form')); ?>
 <fieldset>
    <?php echo CHtml::activeLabelEx($model,'username'); ?>
    <?php echo CHtml::activeTextField($model,'username') ?>
    
    <?php echo CHtml::activeLabelEx($model,'password'); ?>
    <?php echo CHtml::activePasswordField($model,'password') ?>
    
    <?php echo CHtml::activeCheckBox($model,'rememberMe'); ?> Remember Me                                	
    <?php echo CHtml::submitButton(UserModule::t("Sign In"),array('class'=>'button')); ?>
 </fieldset>                                    
 <?php echo CHtml::endForm(); ?>
</div>
<div class="tab-content" id="tab2">
  <?php echo CHtml::errorSummary($model,'<a href="#" class="close"><img src="'.Yii::app()->request->baseUrl.'/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a><div>','</div>',array('class'=>'notification error png_bg')); ?>  

  <?php echo CHtml::beginForm(Yii::app()->getModule('user')->recoveryUrl,'post',array('id'=>'forgot-password-form')); ?>
  <fieldset>
    <?php echo CHtml::activeLabelEx($model,'username'); ?>
    <?php echo CHtml::activeTextField($model,'username') ?>
    <?php echo CHtml::submitButton(UserModule::t("Restore"),array('class'=>'button')); ?>
  </fieldset>                                    
  <?php echo CHtml::endForm(); ?>
</div>


I really hope there is a solution and I won't be forced to have everything in separated pages.

Thanks.
0

#130 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 11 September 2010 - 04:20 PM

You can change the behavior in the controllers/YumRegistrationController.php in actionRecovery();

just write your own RegistrationController that extends YumRegistrationController and overwrite the Recovery action as needed.
0

#131 User is offline   iceblock 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 03-August 10

Posted 14 September 2010 - 10:04 PM

Any pages from this module seems to use the default yii layout instead of the theme used by the project. How can this be changed?
0

#132 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 15 September 2010 - 04:33 AM

View Posticeblock, on 14 September 2010 - 10:04 PM, said:

Any pages from this module seems to use the default yii layout instead of the theme used by the project. How can this be changed?


with this configuration options:

public $layout = 'yum';
public $loginLayout = 'yum';
public $adminLayout = 'yum';

just set these to '//layouts/my_custom_layout' and yum will use this layout instead.

be sure to use the latest svn for this feature to work.
0

#133 User is offline   iceblock 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 03-August 10

Posted 15 September 2010 - 11:36 PM

View Postthyseus, on 15 September 2010 - 04:33 AM, said:

with this configuration options:

public $layout = 'yum';
public $loginLayout = 'yum';
public $adminLayout = 'yum';

just set these to '//layouts/my_custom_layout' and yum will use this layout instead.

be sure to use the latest svn for this feature to work.


@thyseus, good to know there's such feature. I'll wait for release :) Hope there'll be one soon.
0

#134 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 16 September 2010 - 01:14 AM

View Posticeblock, on 15 September 2010 - 11:36 PM, said:

@thyseus, good to know there's such feature. I'll wait for release :) Hope there'll be one soon.


i will add even more new features this month (avatar image upload, profile visit history already done, see svn)
cause i need them for a personal project now. after that i will do a one-week feature freeze where this things
will be tested. this feature freezed version will be available as a release canidate then (yum-0.8rc1). After
this test week, i will release 0.8 to the public. This may me in the middle of October maybe.
0

#135 User is offline   psikocrisis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 38
  • Joined: 15-July 10
  • Location:Madrid / Sardinia

Posted 20 September 2010 - 04:37 AM

View Postthyseus, on 16 September 2010 - 01:14 AM, said:

i will add even more new features this month (avatar image upload, profile visit history already done, see svn)
cause i need them for a personal project now. after that i will do a one-week feature freeze where this things
will be tested. this feature freezed version will be available as a release canidate then (yum-0.8rc1). After
this test week, i will release 0.8 to the public. This may me in the middle of October maybe.


Hi thyseus,

I have a question about the module... :)

I need to use different structures for the tables "users" and "profile".

I must alterate the core of the module and loose the possibility of updating the current version with a newest?

What's the best way to achieve this?

Thanks!
0

#136 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 20 September 2010 - 05:12 AM

Here is a real-life example on how i do it:

class User extends YumUser {
	public function relations() {
		$relations = array_merge(parent::relations(), array(
					'sector' => array(self::BELONGS_TO, 'Sector', 'sector_id')));
	$relations = array_merge(parent::relations(), array(
					'events' => array(self::HAS_MANY, 'Events', 'owner_id')));

		return $relations;

	}
  public function rules() {
            $rules = parent::rules();
          $rules[] = array('sector_id', 'safe');
          return $rules;


}


simply extend your application-specific rules from YumUser. This is why we call it YumUser and not simply User. i highly suggest that everyone extends from YumUser and implements his application-specific logic in the application. I could write a documentation in depth how that works, but everyone who is able to develop OOP in php should be able to do it for himself. Good luck ;) if you have questions, just ask me, i could take them to a FAQ later on.

Yii-user-management NEEDS good documentation. A whole lot of features are available but not documented yet. I am no native-english speaker so it's difficult for me tow rite good documentation. Any volunteers? :)
0

#137 User is offline   psikocrisis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 38
  • Joined: 15-July 10
  • Location:Madrid / Sardinia

Posted 20 September 2010 - 05:37 AM

View Postthyseus, on 20 September 2010 - 05:12 AM, said:

Here is a real-life example on how i do it:

class User extends YumUser {
	public function relations() {
		$relations = array_merge(parent::relations(), array(
					'sector' => array(self::BELONGS_TO, 'Sector', 'sector_id')));
	$relations = array_merge(parent::relations(), array(
					'events' => array(self::HAS_MANY, 'Events', 'owner_id')));

		return $relations;

	}
  public function rules() {
            $rules = parent::rules();
          $rules[] = array('sector_id', 'safe');
          return $rules;


}


simply extend your application-specific rules from YumUser. This is why we call it YumUser and not simply User. i highly suggest that everyone extends from YumUser and implements his application-specific logic in the application. I could write a documentation in depth how that works, but everyone who is able to develop OOP in php should be able to do it for himself. Good luck ;) if you have questions, just ask me, i could take them to a FAQ later on.

Yii-user-management NEEDS good documentation. A whole lot of features are available but not documented yet. I am no native-english speaker so it's difficult for me tow rite good documentation. Any volunteers? :)



Ok, so then I should also create my UserController that extend YumUserController, right?

( My "users" table is a bit different from yours... for example, the "username" field is not present, that means I must override all the CRUD operations too)

Thank you!
0

#138 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 20 September 2010 - 05:45 AM

you could also look at ENABLE_REGISTRATION_BY_EMAIL and LOGIN_BY_EMAIL which are features of yum (see latest svn)
0

#139 User is offline   jim 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 01-February 09
  • Location:Winnipeg,Mb Canada

Posted 20 September 2010 - 02:55 PM

I've installed rev 154 from svn. I have a requirement for users to be able to create users and manage the ones they create. I noticed in my testing that a user that can manage other users can make them a superuser or can allow them to administer any user including users that are superusers. So a non-superuser could easily make himself a superuser if he can manage other users.
Is this part of the extension still being developed?
0

#140 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 20 September 2010 - 03:19 PM

yes, i still develop this part of this Module.

I plan to rethink this whole "which user can administer which other users" thing. I think of the following principle:

1.) remove the existing user_has_user and role_has_role subsystem
2.) add a new 'actionPermission' (or similar) table that looks like the following:

type - can be "role" or "user"
admin_id - WHO can administer
administred_id - WHO can be administraetd
permission - WHAT can be done (update user, change profile data, remove user, message writing,...)

3.) example:

imagine a dataset like:

type "role", admin_id "5", administered_id "7" and permission "update user"

this now means that every user of role 5 can update every users that have role 7.

this way should be much more flexible than the existing system.

do you have any additional ideas/thoughts about this? am i missing something?

i would start the implementation instantly, cause i need this for a real-life project at the moment, too.
it shouldn´t take too long to have a first alpha-release for testing.

edit: and of course if you want i can give you SVN commit access to the google code repository, any help is appreciated of course!!
0

Share this topic:


  • (30 Pages)
  • +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • 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