3ef995c2108fe77d22c0b556fb9717cb848bc48f
bernd Auch mailaccounts können si...

bernd authored 19 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 year ago

2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 14 years ago

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

Hanno Böck authored 4 years ago

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

Bernd Wurst authored 14 years ago

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

Hanno Böck authored 4 years ago

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

Bernd Wurst authored 14 years ago

11) 
12) 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.
13) */
bernd Auch mailaccounts können si...

bernd authored 19 years ago

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

bernd authored 16 years ago

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

bernd authored 19 years ago

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

Hanno authored 8 years ago

25) if ($_POST['password1'] != '') {
26)     check_form_token('imap_chpass');
27)     $result = find_role($_SESSION['mailaccount'], $_POST['old_password']);
28) 
29)     if ($_POST['old_password'] == '') {
30)         input_error('Altes Passwort nicht angegeben!');
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 2 years ago

31)     } elseif (!$result & ROLE_MAILACCOUNT) {
Hanno Fix coding style with php-c...

Hanno authored 8 years ago

32)         input_error('Das bisherige Passwort ist nicht korrekt!');
33)     } elseif ($_POST['password2'] != $_POST['password1']) {
34)         input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
35)     } elseif ($_POST['password2'] == '') {
36)         input_error('Sie müssen das neue Passwort zweimal eingeben!');
37)     } elseif (($check = strong_password($_POST['password1'])) !== true) {
38)         input_error("Das Passwort ist zu einfach ({$check})!");
39)     } else {
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 4 years ago

40)         change_mailaccount(get_mailaccount_id($_SESSION['mailaccount']), ['password' => $_POST['password1']]);
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 2 years ago

41)         if (!$debugmode) {
Hanno Fix coding style with php-c...

Hanno authored 8 years ago

42)             header('Location: chpass');
43)         } else {
44)             output('');
45)         }
46)     }
bernd Auch mailaccounts können si...

bernd authored 19 years ago

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

bernd authored 16 years ago

51) output('<p>Hier können Sie Ihr Passwort ändern.</p>
Hanno Böck Spaces between string conca...

Hanno Böck authored 2 years ago

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

bernd authored 19 years ago

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

Hanno authored 6 years ago

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

bernd authored 19 years ago

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

bernd authored 18 years ago

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

Hanno authored 6 years ago

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