86a998cc45a0bc186446c40ca878b3f57df85795
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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

modules/email/chpass.php  5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

modules/email/chpass.php  9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/chpass.php 10) 
modules/email/chpass.php 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.
modules/email/chpass.php 12) */
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 13) 
modules/vmail/chpass.php 14) require_once('session/start.php');
modules/vmail/chpass.php 15) require_once('vmail.php');
bernd Alles in das email-modul ve...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

Hanno Böck authored 2 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 13 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

modules/email/chpass.php 24) 
modules/email/chpass.php 25) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

modules/email/chpass.php 26) if (isset($_POST['password1']) && $_POST['password1'] != '') {
modules/email/chpass.php 27)     $accname = $_SESSION['mailaccount'];
modules/email/chpass.php 28)     check_form_token('email_chpass');
modules/email/chpass.php 29)     $result = find_role($accname, $_POST['old_password']);
modules/email/chpass.php 30) 
modules/email/chpass.php 31)     if ($_POST['old_password'] == '') {
modules/email/chpass.php 32)         input_error('Altes Passwort nicht angegeben!');
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 6 months ago

modules/email/chpass.php 33)     } elseif (!$result & ROLE_VMAIL_ACCOUNT) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

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

Bernd Wurst authored 3 years ago

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

Hanno authored 5 years ago

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

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 3 years ago

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

Hanno authored 5 years ago

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

Bernd Wurst authored 3 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

modules/vmail/chpass.php 53) }
modules/vmail/chpass.php 54) 
modules/vmail/chpass.php 55) 
modules/vmail/chpass.php 56) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

Hanno Böck authored 6 months ago

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

bernd authored 16 years ago

modules/vmail/chpass.php 59)   <tr>
Hanno Böck Remaining HTML fixes email,...

Hanno Böck authored 3 months ago

modules/email/chpass.php 60)     <td>bisheriges Passwort:</td>  <td><input type="password" name="old_password" value=""></td>
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 61)   </tr>
modules/vmail/chpass.php 62)   <tr>
Hanno Böck Remaining HTML fixes email,...

Hanno Böck authored 3 months ago

modules/email/chpass.php 63)     <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 64)   </tr>
modules/vmail/chpass.php 65)   <tr>
Hanno Böck Remaining HTML fixes email,...

Hanno Böck authored 3 months ago

modules/email/chpass.php 66)     <td>Bestätigung:<br><span style="font-size: 80%;">(nochmal neues Passwort)</span></td>
modules/email/chpass.php 67)                                    <td><input type="password" name="password2" value="" autocomplete="new-password"></td>
bernd Auch vmail-user dürfen Pass...

bernd authored 16 years ago

modules/vmail/chpass.php 68)   </tr>
modules/vmail/chpass.php 69) </table>
Hanno Böck Remaining HTML fixes email,...

Hanno Böck authored 3 months ago

modules/email/chpass.php 70) <p><input type="submit" value="Speichern"></p>