change_password.php
changeset 13 2ff220cfde13
child 47 ae140472d97c
equal deleted inserted replaced
12:7be4525290cc 13:2ff220cfde13
       
     1 <?php
       
     2 require_once("inc/i18n.inc.php");
       
     3 require_once("inc/toolkit.inc.php");
       
     4 
       
     5 if($_POST["submit"])
       
     6 {
       
     7 	if(strlen($_POST["newpass"]) < 8)
       
     8 	{
       
     9 		error('Password length should be at least 8 characters.');
       
    10 	}
       
    11 	else
       
    12 	{
       
    13 		change_user_pass($_POST["currentpass"], $_POST["newpass"], $_POST["newpass2"]);
       
    14 	}
       
    15 }
       
    16 
       
    17 include_once("inc/header.inc.php");
       
    18 ?>
       
    19     <h2>Change password</h2>
       
    20     <form method="post" action="change_password.php">
       
    21      <table border="0" CELLSPACING="4">
       
    22       <tr>
       
    23        <td class="n"><? echo _('Current password'); ?>:</td>
       
    24        <td class="n"><input type="password" class="input" NAME="currentpass" value=""></td>
       
    25       </tr>
       
    26       <tr>
       
    27        <td class="n"><? echo _('New password'); ?>:</td>
       
    28        <td class="n"><input type="password" class="input" NAME="newpass" value=""></td>
       
    29       </tr>
       
    30       <tr>
       
    31        <td class="n"><? echo _('New password'); ?>:</td>
       
    32        <td class="n"><input type="password" class="input" NAME="newpass2" value=""></td>
       
    33       </tr>
       
    34       <tr>
       
    35        <td class="n">&nbsp;</td>
       
    36        <td class="n">
       
    37         <input type="submit" class="button" NAME="submit" value="<? echo _('Change password'); ?>">
       
    38        </td>
       
    39       </tr>
       
    40      </table>
       
    41     </form>
       
    42 
       
    43 <?
       
    44 include_once("inc/footer.inc.php");
       
    45 ?>