da2eaa6d6f8367bf912f8f72272dedd012cbf3e2
bernd Auch mailaccounts können si...

bernd authored 16 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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) 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.
15) */
bernd Auch mailaccounts können si...

bernd authored 16 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

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

Hanno authored 5 years ago

27) if ($_POST['password1'] != '') {
28)     check_form_token('imap_chpass');
29)     $result = find_role($_SESSION['mailaccount'], $_POST['old_password']);
30) 
31)     if ($_POST['old_password'] == '') {
32)         input_error('Altes Passwort nicht angegeben!');
33)     } elseif (! $result & ROLE_MAILACCOUNT) {
34)         input_error('Das bisherige Passwort ist nicht korrekt!');
35)     } elseif ($_POST['password2'] != $_POST['password1']) {
36)         input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
37)     } elseif ($_POST['password2'] == '') {
38)         input_error('Sie müssen das neue Passwort zweimal eingeben!');
39)     } elseif (($check = strong_password($_POST['password1'])) !== true) {
40)         input_error("Das Passwort ist zu einfach ({$check})!");
41)     } else {
42)         change_mailaccount(get_mailaccount_id($_SESSION['mailaccount']), array('password' => $_POST['password1']));
43)         if (! $debugmode) {
44)             header('Location: chpass');
45)         } else {
46)             output('');
47)         }
48)     }
bernd Auch mailaccounts können si...

bernd authored 16 years ago

49) }
50) 
51) 
52) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

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

Hanno authored 4 years ago

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

bernd authored 16 years ago

60)   </tr>
61)   <tr>
bernd Entities repariert

bernd authored 16 years ago

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

Hanno authored 4 years ago

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