[Module] Yii User Management Module

My yiiframework is the latest,and at last i can access the istall page,but it can’t work.because the files are prevented to access. The modules I want to install has the different structure directory,and it’s different from the yii.But it can insatll out side the protected file.

After setting up the extension I am getting this issue…

Alias "user.UserModule" is invalid. Make sure it points to an existing PHP file.

First of, I’m glad you finally posted this question under the correct thread. :)

Second, please check the directory of your YUM because according to your post here:

the ‘user’ folder should be under /protected/modules, not /protected/extensions/modules.

Lastly, make sure that ‘user’ is part of your modules in your main.php, like this:




//in /protected/config/main.php

...

'modules'=>array(

	// uncomment the following to enable the Gii tool

	'gii'=>array(

		'class'=>'system.gii.GiiModule',

		'password'=>'dataline',

	),

	'user' => array(

		'debug' => true,

	),

),

...



This is only an example of course. Change this according to your needs.

yes,I have put it under protected/modules/user as u said but…am finding 1 more issue now…:(

include(C:\xampp\htdocs\testdrive\protected\modules\user\core\YumWebModule.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

You put it under protected/modules/user? So, that makes your directory looks like ‘/protected/modules/user/user’? Kindly clarify :)

Does the YumWebModule.php resides in the said directory? Hmm… A permission problem,perhaps?

Sorry for persistence, but I can’t decide try use current version or wait v0.8, Your plans changed (about release 0.8 at the beginning of february) or not?

then let me decide for you: try the svn! :)

i dont want to get the 0.8 out if there is not everything perfect. and i did not had time yet to

finish the registration process. maybe i do some work over the weekend and we get the 0.8 @beginning of next week… thanks for your interest

If I may ask, what features are added in 0.8?

hi! I’ve create a new app called RWU instead testdrive and when I try to install it (I tried all the possible paths) I get:

Error 404

Unable to resolve the request

I read all the posts but I didn’t find the solution. what files I must modified in order to install the new module in my new app? If I try the same thing with testdrive app it works…!

Thank you,

What was the URL you have used? I think it should be


 http://localhost/rwu/index.php/user/install 

or


 http://localhost/rwu/index.php?r=user/install 

are you sure you have followed all steps in the docs/install_tutorial?

about the changes:

http://code.google.com/p/yii-user-management/source/browse/trunk/user/docs/changelog.txt

and about the 0.8 release:

only one or two more personal hackatons and i declare 0.8 as ‘stable’. It just cant take much longer! :)

about too much features:

Yes. Yum has much features. Too much. I need to rethink the module substructure, and i already have an idea. But this goes into >0.8 somewhere in the future.

Hello all

  1. I’ve just checked out and installed Yum from the SVN(revision 307) trunk.

  2. Installation went without much problems.

  3. I’m able to login, using both demo accounts ‘admin’ and ‘demo’.

4 Despite 2 and 3 above, if I change passwords of the demo accounts, or create a new user, I’m unable to login using the newly created accounts nor the new password for the demo I set.

  1. If I copy password hash values directly in the DB, I’m able to restore original passwords and login. As if md5 hash stored in the DB get’s somehow corrupted before it is stored in the DB.

  2. I have not been programming in PHP for a long time, nevertheless,:username statement used in the code below does not make much sense me, similar statements (variable names with a : prefix) are all over Yum source, what are those? is it a bug, or a feature.


$user = YumUser::model()->find('username = :username', array( ':username' => $this->loginForm->username));



Any suggestions are welcomed. Please advise if I’m missing something, what is causing above password changes not to work, dilemma and comment on the :username.

Thank you.

SQL statements are being prepared to avoid SQL injection. This is a Feature. See the guide on how this works :)

I have no clue about why your password get corrupted. It works on my machine. Did you set a custom function in the application configuration for password hash - or - did you set a salt - of not, could you try and tell us if the password still gets corrupted?

Thank you for the reply and information on the anti SQL injection measure.

I will look into the password issue as you suggested.

Can you please tell me where to set md5 salt, do I have to dig down to the function call.

Thanks again,

My environment:

PHP info in attached.

[root@www ~]# uname -a

FreeBSD ########### 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64

[root@www ~]# httpd -version

Server version: Apache/2.2.15 (FreeBSD)

Server built: Jun 12 2010 03:34:03

Please advise what guide do yo mean below. Thanks

http://www.yiiframework.com/doc/guide/1.1/en/database.dao#binding-parameters

Thanks

I found what the problem is, but I’m still looking for where it happen and why, I don’t know the framework itself yet, so will need some more time.

Somehow YumUser->$password get’s stored in the DB encrypted twice, I’ve checked this, pls see below, if I store, to the DB, values encrypted only once manually, it works.

From ver. 0.5 to 0.6

  • UserModule::disableEmailActivation has been renamed to

    UserModule::enableEmailActivation (default to true)

Open … protected/modules/user/models/YumUser.php

change line (about line 120) :

if(YumWebModule::yum()->disableEmailActivation == true)

to

if(YumWebModule::yum()->enableEmailActivation == true)

Remember default value for property enableEmailActivation is

true, so you must provide the server with mail server, because

confirmation e-mail automaticaly send to your email address. If

you in development state change default enableEmailActivation to

false

Open : protected\modules\user\UserModule.php

change :

public $enableEmailActivation = true;

to :

public $enableEmailActivation = false;

with this option your registration is not validated by email and

automaticaly registered to the application database.

[color="#1C2837"][size="2"][font="Arial"][size="2"]Hello,[/size][/font]

[font=“Arial”][size=“2”]I’m trying to install yii-user-management 0.6 on the latest yii release but keep getting errors.[/size][/font]

[font="Arial"][size="2"]When I try to register in index.php?r=user/user/registration I get an error :[/size][/font]

[font=“Arial”][size=“2”]“CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘timestamp’ doesn’t have a default value”[/size][/font]

[font="Arial"][size="2"]in C:\xampp\htdocs\yii_base\protected\modules\user\models\YumUser.php(132): CActiveRecord->[b]save/b

[/size][/font][font="Arial"][size="2"]and the user is being added to the DB with status 0.[/size][/font]

[font=“Arial”][size=“2”]I’ve changed the status in the db in order to check other things and saw that if I want to edit my profile in index.php?r=user/user/edit[/size][/font]

[font="Arial"][size="2"]I get an error :[/size][/font]

[font="Arial"][size="2"]Fatal error: Call to a member function getErrors() on a non-object in C:\xampp\htdocs\yii-1.1.6.r2877\framework\web\helpers\CHtml.php on line 1566[/size][/font]

[font="Arial"][size="2"]What should I do to fix those problems?[/size][/font]

[font="Arial"][size="2"]Thanks[/size][/font] [/size][/color]

please take a look at the SVN version of yii-user-management, thanks

Thank you for your reply.

I’ve took the files from the SVN, what should I do with the folder “user_mongo”?

When I try to install the [size="2"][color="#1C2837"]module from index.php?r=user/install (default settings) I get an error :[/color][/size]

[size=“2”][color="#1C2837"]CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘message_new_friendship’ doesn’t have a default value[/color][/size]

[size="2"] [/size]

[size="2"][color="#1C2837"]how do I fix this error?[/color][/size]