[pLog-svn] r2266 - in plog/branches/plog-1.0.2: class/action/admin
templates/admin
jondaley at devel.plogworld.net
jondaley at devel.plogworld.net
Wed Jun 22 21:22:25 GMT 2005
Author: jondaley
Date: 2005-06-22 21:22:24 +0000 (Wed, 22 Jun 2005)
New Revision: 2266
Modified:
plog/branches/plog-1.0.2/class/action/admin/adminadduseraction.class.php
plog/branches/plog-1.0.2/class/action/admin/adminupdateuserprofileaction.class.php
plog/branches/plog-1.0.2/class/action/admin/adminupdateusersettingsaction.class.php
plog/branches/plog-1.0.2/templates/admin/createuser.template
plog/branches/plog-1.0.2/templates/admin/userprofile.template
plog/branches/plog-1.0.2/templates/admin/usersettings.template
Log:
http://bugs.plogworld.net/view.php?id=458 password fields are now named different things, so they aren't auto-completed by client. reverted change 2081, as it needs more work to work correctly. The code had a confirm password field, but it was ignored. Now the admin has to be smart enough to type in correctly the first time.
Modified: plog/branches/plog-1.0.2/class/action/admin/adminadduseraction.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/action/admin/adminadduseraction.class.php 2005-06-22 11:22:02 UTC (rev 2265)
+++ plog/branches/plog-1.0.2/class/action/admin/adminadduseraction.class.php 2005-06-22 21:22:24 UTC (rev 2266)
@@ -33,7 +33,7 @@
// for data validation purposes
$this->registerFieldValidator( "userName", new StringValidator());
- $this->registerFieldValidator( "userPassword", new PasswordValidator());
+ $this->registerFieldValidator( "newUserPassword", new PasswordValidator());
$this->registerFieldValidator( "userEmail", new EmailValidator());
$this->registerFieldValidator( "userStatus", new IntegerValidator());
$this->registerField( "userFullName" );
@@ -46,7 +46,7 @@
{
// fetch the validated data
$this->_userName = Textfilter::filterAllHTML($this->_request->getValue( "userName" ));
- $this->_userPassword = $this->_request->getValue( "userPassword" );
+ $this->_userPassword = $this->_request->getValue( "newUserPassword" );
$this->_userEmail = Textfilter::filterAllHTML($this->_request->getValue( "userEmail" ));
$this->_userFullName = Textfilter::filterAllHTML($this->_request->getValue( "userFullName" ));
$this->_userStatus = $this->_request->getValue( "userStatus" );
Modified: plog/branches/plog-1.0.2/class/action/admin/adminupdateuserprofileaction.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/action/admin/adminupdateuserprofileaction.class.php 2005-06-22 11:22:02 UTC (rev 2265)
+++ plog/branches/plog-1.0.2/class/action/admin/adminupdateuserprofileaction.class.php 2005-06-22 21:22:24 UTC (rev 2266)
@@ -38,7 +38,7 @@
$this->registerField( "properties" );
$this->registerField( "userIsSiteAdmin" );
$this->registerField( "userName" );
- $this->registerFieldValidator( "userPassword", new PasswordValidator(), true );
+ $this->registerFieldValidator( "userProfilePassword", new PasswordValidator(), true );
$this->registerFieldValidator( "userStatus", new IntegerValidator());
$view = new AdminEditSiteUserView( $this->_blogInfo );
$view->setErrorMessage( $this->_locale->tr("error_updating_user"));
@@ -49,13 +49,12 @@
{
// get the data
$this->_userId = $this->_request->getValue( "userId" );
- $this->_userPassword = Textfilter::filterAllHTML($this->_request->getValue( "userPassword" ));
+ $this->_userPassword = trim(Textfilter::filterAllHTML($this->_request->getValue( "userProfilePassword" )));
$this->_userEmail = Textfilter::filterAllHTML($this->_request->getValue( "userEmail" ));
$this->_userAbout = Textfilter::filterAllHTML($this->_request->getValue( "userAbout" ));
$this->_userFullName = Textfilter::filterAllHTML($this->_request->getValue( "userFullName" ));
$this->_adminPrivs = $this->_request->getValue( "userIsSiteAdmin" );
$this->_userProperties = $this->_request->getValue( "properties" );
- $this->_userPassword = trim($this->_request->getValue( "userPassword" ));
$this->_userStatus = $this->_request->getValue( "userStatus" );
// load the user settings
Modified: plog/branches/plog-1.0.2/class/action/admin/adminupdateusersettingsaction.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/action/admin/adminupdateusersettingsaction.class.php 2005-06-22 11:22:02 UTC (rev 2265)
+++ plog/branches/plog-1.0.2/class/action/admin/adminupdateusersettingsaction.class.php 2005-06-22 21:22:24 UTC (rev 2266)
@@ -33,7 +33,7 @@
$this->registerFieldValidator( "userPictureId", new IntegerValidator());
$this->registerField( "userAbout" );
$this->registerField( "properties" );
- $this->registerField( "userPassword" );
+ $this->registerField( "userSettingsPassword" );
$view = new AdminUserProfileView( $this->_blogInfo, $this->_userInfo );
$view->setErrorMessage( $this->_locale->tr("error_updating_user_settings"));
$this->setValidationErrorView( $view );
@@ -46,7 +46,7 @@
function validate()
{
// if all correct, we can proceed
- $this->_userPassword = trim($this->_request->getValue( "userPassword" ));
+ $this->_userPassword = trim($this->_request->getValue( "userSettingsPassword" ));
$this->_userConfirmPassword = trim($this->_request->getValue( "confirmPassword" ));
$valid = parent::validate();
@@ -55,7 +55,7 @@
if( $this->_userPassword != "" ) {
$passwordVal = new PasswordValidator();
if( !$passwordVal->validate( $this->_userPassword )) {
- $this->_form->setFieldValidationStatus( "userPassword", false );
+ $this->_form->setFieldValidationStatus( "userSettingsPassword", false );
$this->setCommonData( true );
return false;
}
Modified: plog/branches/plog-1.0.2/templates/admin/createuser.template
===================================================================
--- plog/branches/plog-1.0.2/templates/admin/createuser.template 2005-06-22 11:22:02 UTC (rev 2265)
+++ plog/branches/plog-1.0.2/templates/admin/createuser.template 2005-06-22 21:22:24 UTC (rev 2266)
@@ -19,11 +19,11 @@
<input type="text" name="userFullName" value="{$userFullName}" id="userFullName" />
</div>
<div class="field">
- <label for="userPassword">{$locale->tr("password")}</label>
+ <label for="newUserPassword">{$locale->tr("password")}</label>
<span class="required">*</span>
<div class="formHelp">{$locale->tr("password_help")}</div>
- <input type="password" name="userPassword" value="{$userPassword}" id="userPassword" />
- {include file="$admintemplatepath/validate.template" field=userPassword message=$locale->tr("error_invalid_password")}
+ <input type="password" name="newUserPassword" value="{$newUserPassword}" id="newUserPassword" />
+ {include file="$admintemplatepath/validate.template" field=newUserPassword message=$locale->tr("error_invalid_password")}
</div>
<div class="field">
<label for="userEmail">{$locale->tr("email")}</label>
Modified: plog/branches/plog-1.0.2/templates/admin/userprofile.template
===================================================================
--- plog/branches/plog-1.0.2/templates/admin/userprofile.template 2005-06-22 11:22:02 UTC (rev 2265)
+++ plog/branches/plog-1.0.2/templates/admin/userprofile.template 2005-06-22 21:22:24 UTC (rev 2266)
@@ -18,14 +18,10 @@
<input type="text" id="userFullName" name="userFullName" value="{$userFullName}"/>
</div>
<div class="field">
- <label for="userPassword">{$locale->tr("password")}</label>
+ <label for="userProfilePassword">{$locale->tr("password")}</label>
<div class="formHelp">{$locale->tr("password_help")}</div>
- <input type="password" name="userPassword" id="userPassword" value="{$userPassword}" />
- {include file="$admintemplatepath/validate.template" field=userPassword message=$locale->tr("error_invalid_password")}
- <br/>
- <label for="confirmPassword">{$locale->tr("confirm_password")}</label>
- <input type="password" name="confirmPassword" value="" id="confirmPassword" />
- {include file="$admintemplatepath/validate.template" field=confirmPassword message=$locale->tr("error_passwords_dont_match")}
+ <input type="password" name="userProfilePassword" id="userProfilePassword" value="{$userProfilePassword}" />
+ {include file="$admintemplatepath/validate.template" field=userProfilePassword message=$locale->tr("error_invalid_password")}
</div>
<div class="field">
<label for="userEmail">{$locale->tr("email")}</label>
Modified: plog/branches/plog-1.0.2/templates/admin/usersettings.template
===================================================================
--- plog/branches/plog-1.0.2/templates/admin/usersettings.template 2005-06-22 11:22:02 UTC (rev 2265)
+++ plog/branches/plog-1.0.2/templates/admin/usersettings.template 2005-06-22 21:22:24 UTC (rev 2266)
@@ -20,10 +20,10 @@
</div>
<div class="field">
- <label for="userPassword">{$locale->tr("password")}</label>
+ <label for="userSettingsPassword">{$locale->tr("password")}</label>
<div class="formHelp">{$locale->tr("password_help")}</div>
- <input type="password" name="userPassword" value="{$userPassword}" id="userPassword" />
- {include file="$admintemplatepath/validate.template" field=userPassword message=$locale->tr("error_invalid_password")}
+ <input type="password" name="userSettingsPassword" value="{$userSettingsPassword}" id="userSettingsPassword" />
+ {include file="$admintemplatepath/validate.template" field=userSettingsPassword message=$locale->tr("error_invalid_password")}
<br/>
<label for="confirmPassword">{$locale->tr("confirm_password")}</label>
<input type="password" name="confirmPassword" value="" id="confirmPassword" />
More information about the pLog-svn
mailing list