This topic is locked

Change Password - how to disable blank entry

3/18/2007 2:29:41 PM
PHPRunner General questions
L
Lisa2006 author

Hi Everyone,
Hope you can help with this one.
When user logs in they are directed to there 'LIST PAGE'. As part of the standard PHPRunner routine they are presented with a link to 'change password'.
Here's the problem........
When the users clicks the link, they are shown the 'Change Password' screen (changepwd.php)

They then have to enter there 'Old Password' ...... which is ok.
However, at this point they can simply click SUBMIT and blank entries are accepted as there new password.
i.e. The user can simply login with there 'Username'.
I want to be able to force the user to have to enter a 'New Password' and then to 'Confirm Password'.
Your help would be much appreciated.
Lisa

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=4843&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />

J
Jane 3/19/2007

Losa,
you can check entered values in the Before Change Password event on the Events tab. Here is a sample:

function BeforeChangePassword($oldpassword, $newpassword)

{

if ($newpassword=="")

{

echo "new password is empty";

return false;

}

else

return true;

}