Yii Framework Forum: [extension] estrongpassword - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[extension] estrongpassword jQuery pstrength plugin widget Rate Topic: -----

#1 User is offline   Dana 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 203
  • Joined: 18-February 10
  • Location:Florida, USA

Posted 31 March 2011 - 09:46 AM

This thread is for any discussion related to the estrongpassword extension:

http://www.yiiframew...strongpassword/
3

#2 User is offline   samirfor 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 04-May 11

Posted 20 May 2011 - 04:09 PM

I wanted the widget to return the score as captureOutput.

Is it possible?
0

#3 User is offline   DG Esteban A. PĂ©rez 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 16-September 10
  • Location:Bs. As., Argentina

Posted 26 August 2011 - 03:38 PM

Hello!,

Nice extension.. but... let me suggest some fixes:

in the wrapper change this:

EStrongPassword.php:
80:    		$reqs = CJavaScript::encode($this->requirementOptions);


So when you need to "customize" the plugin just do that:

WhereYouUseTheExtension.php:
  <div class="row">
	<?php echo $form->labelEx($model, 'password'); ?>
	<?php
	$verdicts = array(Yii::t('textos', 'Unsecure'),
                    	Yii::t('textos', 'Normal'),
                    	Yii::t('textos', 'Medium'),
                    	Yii::t('textos', 'Strong'), 
                    	Yii::t('textos', 'Very Strong'));
	$message = Yii::t('texts', 'You must enter a minimum of %d characters');
	$reqs = array(
 'displayMinChar'=> true,
 'minChar'=> 8,
 'minCharText'=> $message,
 'colors'=> array("#f00", "#c06", "#f60", "#3c0", "#3f0"),
 'scores'=> array(20, 30, 43, 50),
 'verdicts'=>  $verdicts,
 'raisePower'=> 1.4,
 'length'=> 0,
 'lowercase'=> 1,
 'uppercase'=> 3,
 'one_number'=> 3,
 'three_numbers'=> 5,
 'one_special_char'=> 3,
 'two_special_char'=> 5,
 'upper_lower_combo'=> 2,
 'letter_number_combo'=> 2,
 'letter_number_char_combo'=> 2,
 'length'=> true,
 'lowercase'=> true,
 'uppercase'=> true,
 'one_number'=> true,
 'three_numbers'=> true,
 'one_special_char'=> true,
 'two_special_char'=> true,
 'upper_lower_combo'=> true,
 'letter_number_combo'=> true,
 'letter_number_char_combo'=> true);
	$this->widget('ext.EStrongPassword.EStrongPassword', 
                         	array('form' => $form,
                                       'model' => $model, 
                                   	'attribute' => 'password', 
                                   	'requirementOptions' => $reqs));
	?>
	<?php echo $form->error($model, 'password'); ?>


An Yii will do the hard work!...

Thanks!!!!

E.
0

#4 User is offline   HomanXH 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 05-June 11

Posted 13 September 2011 - 03:08 AM

I am trying to use the extension, today. By README, I added options. But it doesn't go well.
	<div class="row">
		<?php echo $form->labelEx($model,'password',array('label'=>'Password (8...20 Letter/Number/Symbol Combination)') ); ?>
		<?php //echo $form->passwordField($model,'password',array('size'=>20,'maxlength'=>256)); ?>
		<?php $this->widget('ext.EStrongPassword.EStrongPassword',
				array('form'=>$form, 'model'=>$model, 'attribute'=>'password', 
				'requirementsOptions'=>array('minChar'=>8,'one_special_char'=>true)
		));?>
		<?php echo $form->error($model,'password'); ?>
	</div>


error output:
CException
Property "EStrongPassword.requirementsOptions" is not defined. 

0

#5 User is offline   Dana 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 203
  • Joined: 18-February 10
  • Location:Florida, USA

Posted 13 September 2011 - 11:43 AM

View PostHomanXH, on 13 September 2011 - 03:08 AM, said:

I am trying to use the extension, today. By README, I added options. But it doesn't go well.
	<div class="row">
		<?php echo $form->labelEx($model,'password',array('label'=>'Password (8...20 Letter/Number/Symbol Combination)') ); ?>
		<?php //echo $form->passwordField($model,'password',array('size'=>20,'maxlength'=>256)); ?>
		<?php $this->widget('ext.EStrongPassword.EStrongPassword',
				array('form'=>$form, 'model'=>$model, 'attribute'=>'password', 
				'requirementsOptions'=>array('minChar'=>8,'one_special_char'=>true)
		));?>
		<?php echo $form->error($model,'password'); ?>
	</div>


error output:
CException
Property "EStrongPassword.requirementsOptions" is not defined. 



Sorry, that example was bad -- it should be "requirementOptions" singular on the requirement. I will update the extension documentation.
0

#6 User is offline   jmariani 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 53
  • Joined: 12-January 12

Posted 07 May 2012 - 10:46 AM

Hi, Dana.

Very nice extension.
I want to know if there's any way to use it also on server side validation.
A way to send the strength in order to be used with a model validator, maybe?

TIA!
0

#7 User is offline   Hrach 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 14-May 12

Posted 14 May 2012 - 09:26 AM

Hello Dana,

I have installed the extension and it is very amazing :).

Could you please answer a question?

is there possibility to restrict user to use weak and normal passwords?

Thanks,
Hrach
0

#8 User is offline   Markz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 16-April 13

Posted 26 April 2013 - 04:57 AM

Hi,

I got this error "Object of class EStrongPassword could not be converted to string ".

Below is my code on my form:
echo $this->widget('ext.EStrongPassword.EStrongPassword', array('form'=>$form, 'model'=>$model, 'attribute'=>'password','requirementOptions'=>array('minChar'=>8,'one_special_char'=>true)));


I also put the EStrongPassword folder into /protected/extensions.

Do I need to add some codes on the main config file to make it work?

I would greatly appreciate for your help.

Thanks.
0

Share this topic:


Page 1 of 1
  • 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