bernd commited on 2008-02-02 15:57:58
Zeige 1 geänderte Dateien mit 59 Einfügungen und 0 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@933 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... |
@@ -0,0 +1,59 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+require_once('session/start.php');
|
|
| 4 |
+ |
|
| 5 |
+require_once('vmail.php');
|
|
| 6 |
+ |
|
| 7 |
+require_role(ROLE_VMAIL_ACCOUNT); |
|
| 8 |
+ |
|
| 9 |
+$accname = $_SESSION['mailaccount']; |
|
| 10 |
+ |
|
| 11 |
+$title = "Passwort ändern"; |
|
| 12 |
+ |
|
| 13 |
+if ($_POST['password1'] != '') |
|
| 14 |
+{
|
|
| 15 |
+ check_form_token('vmail_chpass');
|
|
| 16 |
+ $result = find_role($_SESSION['mailaccount'], $_POST['old_password']); |
|
| 17 |
+ |
|
| 18 |
+ if ($_POST['old_password'] == '') |
|
| 19 |
+ input_error('Altes Passwort nicht angegeben!');
|
|
| 20 |
+ elseif (! $result & ROLE_VMAIL_ACCOUNT) |
|
| 21 |
+ input_error('Das bisherige Passwort ist nicht korrekt!');
|
|
| 22 |
+ elseif ($_POST['password2'] != $_POST['password1']) |
|
| 23 |
+ input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
|
|
| 24 |
+ elseif ($_POST['password2'] == '') |
|
| 25 |
+ input_error('Sie müssen das neue Passwort zweimal eingeben!');
|
|
| 26 |
+ elseif (($check = strong_password($_POST['password1'])) !== true) |
|
| 27 |
+ input_error("Das Passwort ist zu einfach (cracklib sagt: {$check})!");
|
|
| 28 |
+ else {
|
|
| 29 |
+ change_vmail_password($accname, $_POST['password1']); |
|
| 30 |
+ if (! $debugmode) |
|
| 31 |
+ header('Location: chpass.php');
|
|
| 32 |
+ else |
|
| 33 |
+ output('');
|
|
| 34 |
+ } |
|
| 35 |
+} |
|
| 36 |
+ |
|
| 37 |
+ |
|
| 38 |
+ |
|
| 39 |
+output('<h3>Passwort ändern</h3>
|
|
| 40 |
+<p>Hier können Sie Ihr Passwort ändern.</p> |
|
| 41 |
+'.html_form('vmail_chpass', 'chpass.php', '', '<table>
|
|
| 42 |
+ <tr> |
|
| 43 |
+ <td>bisheriges Passwort:</td> <td><input type="password" name="old_password" value="" /></td> |
|
| 44 |
+ </tr> |
|
| 45 |
+ <tr> |
|
| 46 |
+ <td>neues Passwort:</td> <td><input type="password" name="password1" value="" /></td> |
|
| 47 |
+ </tr> |
|
| 48 |
+ <tr> |
|
| 49 |
+ <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td> |
|
| 50 |
+ <td><input type="password" name="password2" value="" /></td> |
|
| 51 |
+ </tr> |
|
| 52 |
+</table> |
|
| 53 |
+<p><input type="submit" value="Speichern" /></p> |
|
| 54 |
+')); |
|
| 55 |
+ |
|
| 56 |
+ |
|
| 57 |
+ |
|
| 58 |
+ |
|
| 59 |
+?> |
|
| 0 | 60 |