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

Jump to content

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

#81 User is offline   balrok 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 13-June 10

Posted 06 July 2010 - 05:54 PM

edit: I'm using this module in version 0.7 from the downloadpage


hello i have an error here..my database is using a tableprefix 'abc_', but when i installed the module i named all tables x_*
but now i get following error after login:
The table "abc_users" for active record class "YumUser" cannot be found in the database.

but all x_ prefixed tables were successfully created..

Or when looking at the code.. you probably should note somewhere, that I have to change the configs, if i use non-default tables

next thing is very wrong confusing intendention in models/YumUser.php:
 52     public function tableName()
 53     {
 54         if (isset(Yii::app()->controller->module->usersTable))
 55             $this->_tableName = Yii::app()->controller->module->usersTable;
 56         elseif (isset(Yii::app()->modules['user']['usersTable']))
 57             $this->_tableName = Yii::app()->modules['user']['usersTable'];
 58         else
 59             $this->_tableName = '{{users}}'; // fallback if nothing is set
 60             $this->_tableName = 'users'; // fallback if nothing is set
 61 
 62         return YumHelper::resolveTableName($this->_tableName,$this->getDbConnection());
 63     }

on line 60 - this must be one tab left
0

#82 User is offline   prof1 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 10-June 10
  • Location:Tomsk, Russian Federation

Posted 11 July 2010 - 02:16 AM

Has the author intention to continue working out of this project?
0

#83 User is offline   imehesz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 13-June 09
  • Location:Jacksonville, FL

Posted 11 July 2010 - 07:47 AM

View Postprof1, on 11 July 2010 - 02:16 AM, said:

Has the author intention to continue working out of this project?


hello,

they just updated it about 2 weeks ago, so I guess yes ...
http://www.yiiframew...ser-management/

(check out the download section!)

--iM
It’s done, the great act of creation.
The maker rests. The wheel’s in motion.
-- Imre Madách

check out Yii Theme Factory at http://yii.themefactory.net
0

#84 User is offline   thyseus 

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

Posted 19 July 2010 - 02:02 AM

yes, definitely. A quite big real-life project (of course YUM is involved :) ) eats up my free time at the moment. But as soon as this project comes to an end, i will merge the new developed features in the yum-svn and release a new Version. There are still some things that can be made better in Yum. Now that it slowly has gained some popularity it really gets time far a 1.0 stable release.

Thanks to google code everyone still can contribute with small fixes or features... just drop me a message and i add you to the commiters list.
0

#85 User is offline   amorangi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 01-May 09

Posted 19 July 2010 - 03:10 PM

Yii 1.1.3, Yum 0.7

A couple of things:

I couldn't install as it kept saying I wasn't in debug mode. I had to change YumInstallController.php line 37 to
if($this->module->debug === 'true')
to get it to work.

Secondly I'm getting the following error
PHP Error
Description

Trying to get property of non-object
Source File

/var/www/cf/protected/modules/user/components/YumWebUser.php(48)

00036:     }
00037: 
00038:     /**
00039:      * Checks if this (non-admin) User can administrate some users
00040:      */
00041:     public static function hasUsers($uid = 0)
00042:     {
00043:         if($uid == 0)
00044:             $uid = Yii::app()->user->getId();
00045: 
00046:         $user = YumUser::model()->findByPk($uid);
00047: 
00048: return $user->users !== array();
00049:     }
00050: 
00051: /**
00052:      * Checks if this (non-admin) User can administrate the given user
00053:      */
00054:     public static function hasUser($username, $uid = 0)
00055:     {
00056: 
00057:         if($uid == 0)
00058:             $uid = Yii::app()->user->getId();
00059: 
00060:         // Every user can modify himself

Stack Trace

#0 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/base/CComponent.php(616) : eval()'d code(1): hasUsers()
#1 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/base/CComponent.php(616): eval()
#2 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/auth/CAccessControlFilter.php(337): CAccessRule->evaluateExpression()
#3 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/auth/CAccessControlFilter.php(240): CAccessRule->isExpressionMatched()
#4 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/auth/CAccessControlFilter.php(111): CAccessRule->isUserAllowed()
#5 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/filters/CFilter.php(39): CAccessControlFilter->preFilter()
#6 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/CController.php(1049): CAccessControlFilter->filter()
#7 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/filters/CInlineFilter.php(59): YumUserController->filterAccessControl()
#8 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/filters/CFilterChain.php(126): CInlineFilter->filter()
#9 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/CController.php(283): CFilterChain->run()
#10 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/CController.php(257): YumUserController->runActionWithFilters()
#11 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/CWebApplication.php(324): YumUserController->run()
#12 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/web/CWebApplication.php(121): CWebApplication->runController()
#13 /home/nitrous/orac/software/WebDev/yii-1.1.3.r2247/framework/base/CApplication.php(135): CWebApplication->processRequest()
#14 /var/www/cf/index.php(12): CWebApplication->run()

2010-07-20 07:50:45 Apache/2.2.14 (Ubuntu) Yii Framework/1.1.3

0

#86 User is offline   Murali 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 11-October 09
  • Location:Bangalore

Posted 23 July 2010 - 07:15 AM

View Postprof1, on 25 June 2010 - 07:45 AM, said:

Error after I have sent the message and click "Back to inbox" (r=user/messages/index):

Description
YiiBase::include(Yum.php) [<a href='function.YiiBase-include'>function.YiiBase-include</a>]: failed to open stream: No such file or directory

Source File
D:\xampp\htdocs\Yii_Site\yii\framework\YiiBase.php(338)

00326: * @param string class name
00327: * @return boolean whether the class has been loaded successfully
00328: */
00329: public static function autoload($className)
00330: {
00331: // use include so that the error PHP file may appear
00332: if(isset(self::$_coreClasses[$className]))
00333: include(YII_PATH.self::$_coreClasses[$className]);
00334: else if(isset(self::$_classes[$className]))
00335: include(self::$_classes[$className]);
00336: else
00337: {
00338: include($className.'.php');
00339: return class_exists($className,false) || interface_exists($className,false);
00340: }
00341: return true;
00342: }
00343:
00344: /**
00345: * Writes a trace message.
00346: * This method will only log a message when the application is in debug mode.
00347: * @param string message to be logged
00348: * @param string category of the message
00349: * @see log
00350: */
Stack Trace
#0 D:\xampp\htdocs\Yii_Site\yii\framework\YiiBase.php(338): autoload()
#1 unknown(0): autoload()
#2 D:\xampp\htdocs\Yii_Site\yii\framework\base\CComponent.php(587) : eval()'d code(2): spl_autoload_call()
#3 D:\xampp\htdocs\Yii_Site\yii\framework\base\CComponent.php(587): eval()
#4 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\grid\CDataColumn.php(125): CDataColumn->evaluateExpression()
#5 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\grid\CGridColumn.php(135): CDataColumn->renderDataCellContent()
#6 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\grid\CGridView.php(447): CDataColumn->renderDataCell()
#7 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\grid\CGridView.php(420): CGridView->renderTableRow()
#8 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\grid\CGridView.php(333): CGridView->renderTableBody()
#9 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\CBaseListView.php(152): CGridView->renderItems()
#10 unknown(0): CGridView->renderSection()
#11 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\CBaseListView.php(135): preg_replace_callback()
#12 D:\xampp\htdocs\Yii_Site\yii\framework\zii\widgets\CBaseListView.php(121): CGridView->renderContent()
#13 D:\xampp\htdocs\Yii_Site\yii\framework\web\CBaseController.php(174): CGridView->run()
#14 D:\xampp\htdocs\Yii_Site\!UserManagementModuleTest\protected\modules\user\views\messages\index.php(37): YumMessagesController->widget()
#15 D:\xampp\htdocs\Yii_Site\yii\framework\web\CBaseController.php(119): require()
#16 D:\xampp\htdocs\Yii_Site\yii\framework\web\CBaseController.php(88): YumMessagesController->renderInternal()
#17 D:\xampp\htdocs\Yii_Site\yii\framework\web\CController.php(748): YumMessagesController->renderFile()
#18 D:\xampp\htdocs\Yii_Site\yii\framework\web\CController.php(687): YumMessagesController->renderPartial()
#19 D:\xampp\htdocs\Yii_Site\!UserManagementModuleTest\protected\modules\user\controllers\YumMessagesController.php(97): YumMessagesController->render()
#20 D:\xampp\htdocs\Yii_Site\yii\framework\web\actions\CInlineAction.php(32): YumMessagesController->actionIndex()
#21 D:\xampp\htdocs\Yii_Site\yii\framework\web\CController.php(300): CInlineAction->run()
#22 D:\xampp\htdocs\Yii_Site\yii\framework\web\filters\CFilterChain.php(129): YumMessagesController->runAction()
#23 D:\xampp\htdocs\Yii_Site\yii\framework\web\filters\CFilter.php(41): CFilterChain->run()
#24 D:\xampp\htdocs\Yii_Site\yii\framework\web\CController.php(999): CAccessControlFilter->filter()
#25 D:\xampp\htdocs\Yii_Site\yii\framework\web\filters\CInlineFilter.php(59): YumMessagesController->filterAccessControl()
#26 D:\xampp\htdocs\Yii_Site\yii\framework\web\filters\CFilterChain.php(126): CInlineFilter->filter()
#27 D:\xampp\htdocs\Yii_Site\yii\framework\web\CController.php(283): CFilterChain->run()
#28 D:\xampp\htdocs\Yii_Site\yii\framework\web\CController.php(257): YumMessagesController->runActionWithFilters()
#29 D:\xampp\htdocs\Yii_Site\yii\framework\web\CWebApplication.php(320): YumMessagesController->run()
#30 D:\xampp\htdocs\Yii_Site\yii\framework\web\CWebApplication.php(120): CWebApplication->runController()
#31 D:\xampp\htdocs\Yii_Site\yii\framework\base\CApplication.php(135): CWebApplication->processRequest()
#32 D:\xampp\htdocs\Yii_Site\!UserManagementModuleTest\index.php(12): CWebApplication->run()


I too got the same error.. can anyone explain how to solve this..
thanks
MuraliKrishna.G
0

#87 User is offline   TeKi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 07-March 10

Posted 28 July 2010 - 04:29 AM

Hi all, impressive work thyseus. Do you have intention to continue on this module?

BEst regards.

Yii development
0

#88 User is offline   Seal 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 126
  • Joined: 02-February 10

Posted 04 August 2010 - 03:25 PM

View PostTeKi, on 28 July 2010 - 04:29 AM, said:

Hi all, impressive work thyseus. Do you have intention to continue on this module?

BEst regards.


The project is certainly progressing very well indeed
Sylvester La-Tunje

Posted Image
0

#89 User is offline   xgarb 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 19-July 10

Posted 14 August 2010 - 01:54 PM

View PostMurali, on 23 July 2010 - 07:15 AM, said:

I too got the same error.. can anyone explain how to solve this..
thanks


line 23 of user/views/messages/index.php needs to be changed to:

YumHelper::route(\'{user}/profile\'),

0

#90 User is offline   xgarb 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 19-July 10

Posted 14 August 2010 - 01:56 PM

As it stands there doesn't appear to be anything to prevent reading other people's messages by changing the message ID in the URL ie.. r=user/messages/view&id=3 etc
0

#91 User is offline   Seal 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 126
  • Joined: 02-February 10

Posted 14 August 2010 - 02:10 PM

View Postxgarb, on 14 August 2010 - 01:56 PM, said:

As it stands there doesn't appear to be anything to prevent reading other people's messages by changing the message ID in the URL ie.. r=user/messages/view&id=3 etc


Hi xgarb,

What version do you have?
Have you tried the latest svn? http://yii-user-mana....com/svn/trunk/

If so post back comments
Sylvester La-Tunje

Posted Image
0

#92 User is offline   xgarb 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 19-July 10

Posted 14 August 2010 - 03:03 PM

View PostSeal, on 14 August 2010 - 02:10 PM, said:

Hi xgarb,

What version do you have?
Have you tried the latest svn? http://yii-user-mana....com/svn/trunk/

If so post back comments


Hi,

Quick test and look at the svn code shows this as fixed.
0

#93 User is offline   xgarb 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 39
  • Joined: 19-July 10

Posted 16 August 2010 - 06:36 AM

Does the messaging system have anything to prevent sending messages as someone else?

I notice the compose form has this code:
echo CHtml::activeHiddenField($model,'from_user_id', array(
				'value' => Yii::app()->user->id));


The hidden form field could be altered in the returned POST.

I have something like this:
$message->attributes=$_POST['Pm'];
$message->from_user_id=Yii::app()->user->getId();

in the controller and don't use hidden fields.
0

#94 User is offline   thyseus 

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

Posted 16 August 2010 - 09:40 AM

@xgarb: good idea. I will include this in the 0.8 release !
0

#95 User is offline   thammu 

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

Posted 22 August 2010 - 09:21 AM

I wanted to use 'user management module' with the yii blog demo. But the blog tbl_user has different structure from tbl_users. How do you integrate the two.

Also in the blog application the login is at .../site/login, while user management url points to ../user/site/login.

So basically my question is what changes to make in either blog demo or user management module so that there is no clash on url or databases.
0

#96 User is offline   thyseus 

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

Posted 22 August 2010 - 02:42 PM

simply follow the installation tutorial in docs/installtutorial.txt. This should work on the blog demo (and every other web application).

tbl_user doesn't interfere with tbl_users of yii-user-management.

the link in the main menu can easily be replaced with //user/user/login so that everything works.
0

#97 User is offline   thammu 

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

Posted 22 August 2010 - 11:13 PM

View Postthyseus, on 22 August 2010 - 02:42 PM, said:

simply follow the installation tutorial in docs/installtutorial.txt. This should work on the blog demo (and every other web application).

tbl_user doesn't interfere with tbl_users of yii-user-management.

the link in the main menu can easily be replaced with //user/user/login so that everything works.


But I want the 'salt', security!
0

#98 User is offline   thammu 

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

Posted 22 August 2010 - 11:49 PM

View Postthyseus, on 22 August 2010 - 02:42 PM, said:

simply follow the installation tutorial in docs/installtutorial.txt. This should work on the blog demo (and every other web application).

tbl_user doesn't interfere with tbl_users of yii-user-management.

the link in the main menu can easily be replaced with //user/user/login so that everything works.



After you change url in ..\blog\protected\views\layouts\main.php, to

array('label'=>'Login', 'url'=>array('user/user/login'), 'visible'=>Yii::app()->user->isGuest),
array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('user/user/logout'), 'visible'=>!Yii::app()->user->isGuest)

the url in the menu has an extra \user in the url once we navigate back from user management pages, i.e the 'home' url changes to "...user/post/index" instead of ".../post/index" and gives a 404 error. Similarly for 'contact' and 'about' links.
0

#99 User is offline   thyseus 

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

Posted 23 August 2010 - 01:47 AM

View Postthammu, on 22 August 2010 - 11:49 PM, said:

After you change url in ..\blog\protected\views\layouts\main.php, to

array('label'=>'Login', 'url'=>array('user/user/login'), 'visible'=>Yii::app()->user->isGuest),
array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('user/user/logout'), 'visible'=>!Yii::app()->user->isGuest)

the url in the menu has an extra \user in the url once we navigate back from user management pages, i.e the 'home' url changes to "...user/post/index" instead of ".../post/index" and gives a 404 error. Similarly for 'contact' and 'about' links.


since yii 1.1.2 you can use the array('//controller/action') syntax for directly accessing the root url. (using two slashes at the beginning of the url declaration)

/ would be the module root.

so you can set the urls to //post/index so everything works fine.

you can also use a '//module/controller/action' syntax.

but you are right, this definitely should go into the documentation.
0

#100 User is offline   thammu 

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

Posted 23 August 2010 - 02:20 AM

View Postthyseus, on 23 August 2010 - 01:47 AM, said:

since yii 1.1.2 you can use the array('//controller/action') syntax for directly accessing the root url. (using two slashes at the beginning of the url declaration)

/ would be the module root.

so you can set the urls to //post/index so everything works fine.

you can also use a '//module/controller/action' syntax.

but you are right, this definitely should go into the documentation.


Thanks, it works like a dream..

Pls. put in 'salt'. You have already defined it in UserModule.php
0

Share this topic:


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