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

Jump to content

  • (30 Pages)
  • +
  • « First
  • 27
  • 28
  • 29
  • 30
  • 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

#561 User is offline   Accilies 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 29-April 12

Posted 06 May 2013 - 03:10 PM

I have been working on this for a while now. Documentation really needs some improvements.

My question is related to permission & subordiate_id. How do I use that and how does it affect the permission system.

eg.

Action = Can_add_one 
Permission = To Role A 

Action = Can_add_two
Permission = To Role B


if I use subordinate when granting permission, how does it effect and how to use it?

Regards,
Shoeb Surya
0

#562 User is offline   dhimes 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 07-August 12

Posted 08 May 2013 - 09:21 AM

Hi Shoeb,

I've not used permissions, but since no one else is here I'll try to help. It looks like you might call

Yii::app()->user->can('actionName');

Incidentally, I had a difficult time with the unit tests shipped with YUM. Since I find it easier to explore how things work with unit tests, I struggled with this a bit. I found that adding

Yum::module('registration')->enableCaptcha = false;

into the RegistrationTest.php file allowed me to use the file on the module.

You can then explore the permissions system with code like

 $this->assertFalse(Yii::app()->user->can('save'));


HTH!
0

#563 User is offline   qua.pham 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 27-May 13

Posted 28 May 2013 - 10:03 PM

many thks but i also don't fix this error .

regards.
0

#564 User is offline   friedFinger 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 18-January 13

Posted 29 May 2013 - 07:03 AM

Hi,
I have installed yii user management module, and its working fine,
I am able to register, send activation mail and activate account.
However, I tried to set the firstVisit Parameter in User.module to the membership order page. But when I login for the first time after activating my account, I am still getting redirected to the home page, rather than the membership page.
I was trying to trace it from the YumAuthController redirect function, by adding logs:
 public function redirectUser($user) {
     Yii::log('----------Redirecting User---');
     $user->lastvisit = time();
     $user->save(true, array('lastvisit'));
     Yii::log('----------set last visit time ---');
 
     Yii::app()->user->setState('first_login', true);
     Yii::log('----------set state  first login ---');
     if(isset($_POST) && isset($_POST['returnUrl']))
       $this->redirect(array($_POST['returnUrl']));
     Yii::log('----------return url test for admin  ---');
 
     if ($user->superuser && Yum::module()->returnAdminUrl)
       $this->redirect(Yum::module()->returnAdminUrl);
 
     Yii::log('----------return url test for user  ---');
     if(isset(Yii::app()->user->returnUrl))
       $this->redirect(Yii::app()->user->returnUrl);
 
     Yii::log('----------pwd expired---');
     if ($user->isPasswordExpired())
       $this->redirect(array('passwordexpired'));
 
     Yii::log('----------return url not set for user  ---');
     if (Yum::module()->returnUrl !== '')
       $this->redirect(Yum::module()->returnUrl);
     else
       $this->redirect(Yii::app()->user->returnUrl);
     Yii::log('----------now redirect to first vist---');
     $this->redirect(Yum::module()->firstVisitUrl);
   }

The trace file shows the following trace:
2013/05/25 17:50:23 [info] [application] ----------Redirecting User---
2013/05/25 17:50:23 [trace] [system.caching.CFileCache] Serving "yum_translations_en_us_yum" from cache 
2013/05/25 17:50:23 [trace] [system.caching.CFileCache] Serving "yum_translations_en_us_yum" from cache 
2013/05/25 17:50:23 [trace] [system.caching.CFileCache] Serving "yum_translations_en_us_yum" from cache 
2013/05/25 17:50:23 [trace] [system.base.CModule] Loading "avatar" module
2013/05/25 17:50:23 [trace] [system.db.ar.CActiveRecord] YumUser.update()
2013/05/25 17:50:23 [trace] [system.db.ar.CActiveRecord] YumUser.updateByPk()
2013/05/25 17:50:23 [trace] [system.db.CDbCommand] Executing SQL: UPDATE `user` SET `lastvisit`=:yp0 WHERE `user`.`id`='21'
2013/05/25 17:50:23 [trace] [system.base.CModule] Loading "profile" module
2013/05/25 17:50:23 [trace] [system.db.CDbCommand] Querying SQL: SHOW COLUMNS FROM `privacysetting`
2013/05/25 17:50:23 [trace] [system.db.CDbCommand] Querying SQL: SHOW CREATE TABLE `privacysetting`
2013/05/25 17:50:23 [trace] [system.db.ar.CActiveRecord] YumPrivacysetting.findByPk()
2013/05/25 17:50:23 [trace] [system.db.CDbCommand] Querying SQL: SELECT * FROM `privacysetting` `t` WHERE `t`.`user_id`='21' LIMIT 1
2013/05/25 17:50:23 [trace] [system.db.ar.CActiveRecord] writing MANY_MANY data for YumUser
2013/05/25 17:50:23 [trace] [system.caching.CFileCache] Serving "yum_user_relations" from cache
2013/05/25 17:50:23 [info] [application] ----------set last visit time ---
2013/05/25 17:50:23 [info] [application] ----------set state  first login ---
2013/05/25 17:50:23 [info] [application] ----------return url test for admin  ---
2013/05/25 17:50:23 [info] [application] ----------return url test for user  ---


Please let me know why am I not able to transfer to the membership page.

Thanks and Regards,
0

#565 User is offline   JimBond 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 22-March 13

Posted 10 June 2013 - 10:11 PM

Hi, when install on default modules application folder i got yii user module work out.
But when i try to install to common/lib/vendor/
i got
CException

Property "YumWebUser.0" is not defined. 
yiisoft\yii\framework\web\auth\CWebUser.php(160)

  public function __set($name,$value)
  {
     if($this->hasState($name))
         $this->setState($name,$value);
     else
        parent::__set($name,$value);
    }

0

#566 User is offline   saravanakumar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 15-July 13

Posted 15 July 2013 - 09:47 PM

enable short_open_tag = on; in php.ini and restart apache.
Its working fine
0

#567 User is offline   zhtoosi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 45
  • Joined: 30-April 13

Posted 16 July 2013 - 03:59 AM

hi how do work Roles / Access control i see

role Demo user_admin
role Demo user_create

but demo user can not user_create and admin it
0

#568 User is offline   tony_zhy 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 04-August 13

Posted 10 August 2013 - 01:07 AM

Hi,
I downloaded the package from Github as a ZIP file and implemented it, but got error message below when click 'Privacy Setting'. Should I download the r0.8 from here?

include(YumProfileField.php): failed to open stream: No such file or directory
0

#569 User is offline   GTAlex 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 11-December 13

Posted 12 December 2013 - 04:52 AM

After install modules

Try Login /index.php/user/auth/login

admin
admin

Answer:

Quote

Please fix the following input errors:

Username or Password is incorrect
Login is not possible with the given credentials


??!!
0

#570 User is offline   mahendrasm 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 12-December 13

Posted 13 December 2013 - 12:03 AM

I completed the installation of Yii User management Module. Now I Can login as admin/admin, but can not see anyway to extend user/profile fields as there is no profile_field table created.

Any help on this issue will be appreciated.
0

#571 User is offline   Tizak 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 11-January 14

Posted 11 January 2014 - 02:50 PM

I have problems uploading avatar. I get a password error.

Below is a screenshot.
Attached File  Yii_Error.jpg (52.28K)
Number of downloads: 12

So I commented out line 69 in protected/modules/avatar/controllers/YumAvatarController.php
if($model->validate()) {
and also the ending brace in line 84.

Then I got an error that directory 'images' does not exist. So I created the directory in YiiRoot.

Now it gives off the same password error but still uploads the images.

Please what can I do about this?

Thanks
0

#572 User is offline   I-NOZex 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 17-November 12
  • Location:Portugal

Posted 11 January 2014 - 04:09 PM

View PostTizak, on 11 January 2014 - 02:50 PM, said:

I have problems uploading avatar. I get a password error.

Below is a screenshot.
Attachment Yii_Error.jpg

So I commented out line 69 in protected/modules/avatar/controllers/YumAvatarController.php
if($model->validate()) {
and also the ending brace in line 84.

Then I got an error that directory 'images' does not exist. So I created the directory in YiiRoot.

Now it gives off the same password error but still uploads the images.

Please what can I do about this?

Thanks


is your password less than 16chars?
can you show the avatar configuration you have in main.php?

B2R » Beat2Revolution v3.0b | Join and Share us
http://beat2revolution.net/

Posted Image
0

#573 User is offline   Tizak 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 11-January 14

Posted 11 January 2014 - 09:52 PM

View PostI-NOZex, on 11 January 2014 - 04:09 PM, said:

is your password less than 16chars?
can you show the avatar configuration you have in main.php?


Yes, my password is less than 16 characters but more than 6. But I set minLength to 6 in my main.php. Below is part of my main.php config file
		'user' => array(
			'debug' => false,
			'userTable' => 'user',
			'translationTable' => 'translation',
			'enableRestfulApi' => false,
			'passwordRequirements' => array(
				'minLen' => 6,
				'maxLen' => 16,
				'minDigits' => 1,
			)
		),
		'avatar' => array(
//			'enableGravatar' => true,
		),


The funny thing is if I should comment out maxLen, I get no error and the image is uploaded.
0

#574 User is offline   I-NOZex 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 17-November 12
  • Location:Portugal

Posted 12 January 2014 - 06:58 AM

uhm, im tryed and i got the same error...
i will see where is the error and then i will try help you

B2R » Beat2Revolution v3.0b | Join and Share us
http://beat2revolution.net/

Posted Image
0

#575 User is offline   I-NOZex 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 17-November 12
  • Location:Portugal

Posted 12 January 2014 - 07:15 AM

In line 70, of YumAvatarController.php, change what you have, for this:
f($model->validate(array('avatar'))) { 

(sorry for my poor english, i hope help ;) for me, that solves the problem)

B2R » Beat2Revolution v3.0b | Join and Share us
http://beat2revolution.net/

Posted Image
0

#576 User is offline   spyfx 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 14-March 13

Posted 12 January 2014 - 11:37 AM

Hey there, I just cant get hybridauth working.
Im still getting
Error 403
Permission denied

after a successful login. Could anyone help me out here?
0

#577 User is offline   I-NOZex 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 17-November 12
  • Location:Portugal

Posted 12 January 2014 - 11:59 AM

never used the hybrid auth...

B2R » Beat2Revolution v3.0b | Join and Share us
http://beat2revolution.net/

Posted Image
0

#578 User is offline   Tizak 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 11-January 14

Posted 13 January 2014 - 09:16 AM

View PostI-NOZex, on 12 January 2014 - 07:15 AM, said:

In line 70, of YumAvatarController.php, change what you have, for this:
f($model->validate(array('avatar'))) { 

(sorry for my poor english, i hope help ;) for me, that solves the problem)

Your English is okay :D
But your solution does not work. The only thing that works for me is if I disable maxLen in main.php.

I notice the password error even when I try to update other user fields, such as name, not just avatar alone.
0

#579 User is offline   Tizak 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 11-January 14

Posted 13 January 2014 - 11:38 AM

I have another question.

How can I use drop down lists and date picker in the profile edit/update views?

Thanks.
0

#580 User is offline   jokamax 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 21-January 14
  • Location:France

Posted 21 January 2014 - 06:46 AM

Hi,

Is there a way to use yum avatar in personal pages outside yum profil page with a userid ?
ex : yum::getAvatar(userid)

Thanks by advance,

Jok
0

Share this topic:


  • (30 Pages)
  • +
  • « First
  • 27
  • 28
  • 29
  • 30
  • 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