dcc202fb249a446ac15c7cf413b9f1b4a3f31b58
bernd Auch mailaccounts können si...

bernd authored 17 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
12) */
bernd Auch mailaccounts können si...

bernd authored 17 years ago

13) 
14) require_once('session/start.php');
15) 
16) require_once('mailaccounts.php');
17) 
18) require_role(ROLE_MAILACCOUNT);
19) 
20) $account = $_SESSION['accountname'];
21) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

22) title("Passwort ändern");
bernd Auch mailaccounts können si...

bernd authored 17 years ago

23) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

24) if ($_POST['password1'] != '') {
25)     check_form_token('imap_chpass');
26)     $result = find_role($_SESSION['mailaccount'], $_POST['old_password']);
27) 
28)     if ($_POST['old_password'] == '') {
29)         input_error('Altes Passwort nicht angegeben!');
30)     } elseif (! $result & ROLE_MAILACCOUNT) {
31)         input_error('Das bisherige Passwort ist nicht korrekt!');
32)     } elseif ($_POST['password2'] != $_POST['password1']) {
33)         input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
34)     } elseif ($_POST['password2'] == '') {
35)         input_error('Sie müssen das neue Passwort zweimal eingeben!');
36)     } elseif (($check = strong_password($_POST['password1'])) !== true) {
37)         input_error("Das Passwort ist zu einfach ({$check})!");
38)     } else {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

39)         change_mailaccount(get_mailaccount_id($_SESSION['mailaccount']), ['password' => $_POST['password1']]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

40)         if (! $debugmode) {
41)             header('Location: chpass');
42)         } else {
43)             output('');
44)         }
45)     }
bernd Auch mailaccounts können si...

bernd authored 17 years ago

46) }
47) 
48) 
49) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

50) output('<p>Hier können Sie Ihr Passwort ändern.</p>
bernd eliminate .php extensions f...

bernd authored 16 years ago

51) '.html_form('imap_chpass', 'chpass', '', '<table>
bernd Auch mailaccounts können si...

bernd authored 17 years ago

52)   <tr>
53)     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
54)   </tr>
55)   <tr>
Hanno Use autocomplete=new-passwo...

Hanno authored 5 years ago

56)     <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" autocomplete="new-password" /></td>
bernd Auch mailaccounts können si...

bernd authored 17 years ago

57)   </tr>
58)   <tr>
bernd Entities repariert

bernd authored 17 years ago

59)     <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
Hanno Use autocomplete=new-passwo...

Hanno authored 5 years ago

60)                                    <td><input type="password" name="password2" value="" autocomplete="new-password" /></td>