96649f21ba18d07757afa9d98998f7a22c0d86a3
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php  1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/chpass.php  2) /*
modules/email/chpass.php  3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/email/chpass.php  4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

modules/email/chpass.php  5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/chpass.php  6)   Bernd Wurst <bernd@schokokeks.org>
modules/email/chpass.php  7)   Hanno Böck <hanno@schokokeks.org>
modules/email/chpass.php  8) 
modules/email/chpass.php  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.
modules/email/chpass.php 10) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/chpass.php 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

modules/email/chpass.php 12) http://creativecommons.org/publicdomain/zero/1.0/
modules/email/chpass.php 13) 
modules/email/chpass.php 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.
modules/email/chpass.php 15) */
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 16) 
modules/vmail/chpass.php 17) require_once('session/start.php');
modules/vmail/chpass.php 18) require_once('vmail.php');
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 19) require_once('mailaccounts.php');
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 20) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/chpass.php 21) require_role([ROLE_VMAIL_ACCOUNT, ROLE_MAILACCOUNT]);
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 22) 
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 23) $role = $_SESSION['role'];
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 24) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

modules/email/chpass.php 25) title("Passwort ändern");
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 26) 
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 27) 
modules/email/chpass.php 28) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/chpass.php 29) if (isset($_POST['password1']) && $_POST['password1'] != '') {
modules/email/chpass.php 30)     $accname = $_SESSION['mailaccount'];
modules/email/chpass.php 31)     check_form_token('email_chpass');
modules/email/chpass.php 32)     $result = find_role($accname, $_POST['old_password']);
modules/email/chpass.php 33) 
modules/email/chpass.php 34)     if ($_POST['old_password'] == '') {
modules/email/chpass.php 35)         input_error('Altes Passwort nicht angegeben!');
modules/email/chpass.php 36)     } elseif (! $result & ROLE_VMAIL_ACCOUNT) {
modules/email/chpass.php 37)         input_error('Das bisherige Passwort ist nicht korrekt!');
modules/email/chpass.php 38)     } elseif ($_POST['password2'] != $_POST['password1']) {
modules/email/chpass.php 39)         input_error('Die Bestätigung ist nicht identisch mit dem neuen Passwort!');
modules/email/chpass.php 40)     } elseif ($_POST['password2'] == '') {
modules/email/chpass.php 41)         input_error('Sie müssen das neue Passwort zweimal eingeben!');
modules/email/chpass.php 42)     } elseif (($check = strong_password($_POST['password1'])) !== true) {
modules/email/chpass.php 43)         input_error("Das Passwort ist zu einfach ({$check})!");
modules/email/chpass.php 44)     } else {
modules/email/chpass.php 45)         if ($role & ROLE_VMAIL_ACCOUNT) {
modules/email/chpass.php 46)             DEBUG("Ändere VMail-Passwort");
modules/email/chpass.php 47)             change_vmail_password($accname, $_POST['password1']);
Bernd Wurst give success message when c...

Bernd Wurst authored 4 years ago

modules/email/chpass.php 48)             success_msg('Ihr Passwort wurde geändert!');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/chpass.php 49)         } elseif ($role & ROLE_MAILACCOUNT) {
modules/email/chpass.php 50)             DEBUG("Ändere IMAP-Passwort");
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/chpass.php 51)             change_mailaccount(get_mailaccount_id($accname), ['password' => $_POST['password1']]);
Bernd Wurst give success message when c...

Bernd Wurst authored 4 years ago

modules/email/chpass.php 52)             success_msg('Ihr Passwort wurde geändert!');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/chpass.php 53)         }
Bernd Wurst give success message when c...

Bernd Wurst authored 4 years ago

modules/email/chpass.php 54)         redirect('/');
bernd Alles in das email-modul ve...

bernd authored 16 years ago

modules/email/chpass.php 55)     }
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 56) }
modules/vmail/chpass.php 57) 
modules/vmail/chpass.php 58) 
modules/vmail/chpass.php 59) 
bernd Benutze überall title() sta...

bernd authored 14 years ago

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

bernd authored 16 years ago

modules/email/chpass.php 61) '.html_form('email_chpass', 'chpass', '', '<table>
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 62)   <tr>
modules/vmail/chpass.php 63)     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value="" /></td>
modules/vmail/chpass.php 64)   </tr>
modules/vmail/chpass.php 65)   <tr>
Hanno Use autocomplete=new-passwo...

Hanno authored 5 years ago

modules/email/chpass.php 66)     <td>neues Passwort:</td>       <td><input type="password" name="password1" value="" autocomplete="new-password" /></td>
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 67)   </tr>
modules/vmail/chpass.php 68)   <tr>
modules/vmail/chpass.php 69)     <td>Bestätigung:<br /><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
Hanno Use autocomplete=new-passwo...

Hanno authored 5 years ago

modules/email/chpass.php 70)                                    <td><input type="password" name="password2" value="" autocomplete="new-password" /></td>