Auch mailaccounts können si...
bernd authored 19 years ago
|
1) <?php
2)
3) require_once('session/start.php');
4)
5) require_once('mailaccounts.php');
6)
7) require_role(ROLE_MAILACCOUNT);
8)
9) $account = $_SESSION['accountname'];
10)
11) $title = "Passwort ändern";
12)
13) if ($_POST['password1'] != '')
14) {
15) check_form_token('imap_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_MAILACCOUNT)
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_mailaccount(get_mailaccount_id($_SESSION['mailaccount']), array('password' => $_POST['password1']));
30) if (! $debugmode)
|
eliminate .php extensions f...
bernd authored 18 years ago
|
31) header('Location: chpass');
|
Auch mailaccounts können si...
bernd authored 19 years ago
|
32) else
33) output('');
34) }
35) }
36)
37)
38)
|
Entities repariert
bernd authored 18 years ago
|
39) output('<h3>Passwort ändern</h3>
40) <p>Hier können Sie Ihr Passwort ändern.</p>
|
eliminate .php extensions f...
bernd authored 18 years ago
|
41) '.html_form('imap_chpass', 'chpass', '', '<table>
|
Auch mailaccounts können si...
bernd authored 19 years ago
|
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>
|
Entities repariert
bernd authored 18 years ago
|
49) <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
|