f12aba6daa6e2848a8ed60ea57b26874d6675f52
bernd one-time-URLs für systemuser

bernd authored 15 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 Updated copyright notice (2...

Bernd Wurst authored 11 years ago

5) Written 2008-2013 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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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) */
16) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

17) title("Passwort setzen");
bernd one-time-URLs für systemuser

bernd authored 15 years ago

18) $show = 'token';
19) 
20) if (isset($_REQUEST['uid']) and isset($_REQUEST['token']))
21) {
22)   $uid = (int) $_REQUEST['uid'];
23)   $token = $_REQUEST['token'];
24)   
25)   require_once('newpass.php');
26)   require_once('inc/security.php');
27)   if (validate_uid_token($uid, $token))
28)   {
bernd AGB bestätigen lassen

bernd authored 15 years ago

29)     $show = 'agb';
bernd AGB per URL akzeptieren

bernd authored 15 years ago

30)     if ($_REQUEST['agb'] == '1') {
bernd AGB bestätigen lassen

bernd authored 15 years ago

31)       $show = 'password';
32)     }
bernd one-time-URLs für systemuser

bernd authored 15 years ago

33)     if (isset($_POST['password']))
34)     {
35)       if ($_POST['password'] != $_POST['password2'])
36)         input_error("Die beiden Passwort-Eingaben stimmen nicht überein.");
37)       elseif ($_POST['password'] == '')
38)         input_error("Es kann kein leeres Passwort gesetzt werden");
39)       elseif (($result = strong_password($_POST['password'])) !== true)
40)         input_error("Das Passwort ist zu einfach (cracklib sagt: {$result})!");
41)       else
42)       {
43)         require_once('session/checkuser.php');
44)         require_once('inc/base.php');
bernd Logger mit Logleveln

bernd authored 14 years ago

45)         logger(LOG_INFO, "modules/index/initialize_useraccount", "initialize", "uid »{$uid}« set a new password");
bernd one-time-URLs für systemuser

bernd authored 15 years ago

46)         set_systemuser_password($uid, $_POST['password']);
47)         success_msg('Das Passwort wurde gesetzt!');
48)         invalidate_systemuser_token($uid);
49)         $_SESSION['role'] = find_role($uid, '', True);;
50) 	setup_session($_SESSION['role'], $uid);
bernd Benutze überall title() sta...

bernd authored 13 years ago

51) 	title("Passwort gesetzt");
52)         output('<p>Ihr neues Passwort wurde gesetzt, Sie können jetzt '.internal_link('index', 'die Web-Oberfläche sofort benutzen').'.</p>');
bernd one-time-URLs für systemuser

bernd authored 15 years ago

53)         $show = NULL;
54)       }
55)     }
56)   }
57)   else
58)   {
bernd Fehlermeldung bei falschem...

bernd authored 13 years ago

59)     input_error("Der eingegebene Code war nicht korrekt. Eventuell haben Sie die Adresse nicht vollständig übernommen oder die Gültigkeit des Sicherheitscodes ist abgelaufen.");
bernd one-time-URLs für systemuser

bernd authored 15 years ago

60)   }
61) }
62) 
63) if ($show == 'password')
64) {
bernd Benutze überall title() sta...

bernd authored 13 years ago

65)   title("Neues Passwort setzen");
66)   output('<p>Bitte legen Sie jetzt Ihr neues Passwort fest.</p>
bernd bug #579 dokumentieren

bernd authored 15 years ago

67)   <p>Aufgrund einer technischen Einschränkung sollten Sie momentan auf Anführungszeichen (" und \') sowie auf Backslashes (\) im Passwort verzichten.</p>'.
bernd one-time-URLs für systemuser

bernd authored 15 years ago

68)   html_form('initialize_useraccount', '', '', '<p style="display: none"><input type="hidden" name="uid" value="'.$uid.'" />
bernd AGB bestätigen lassen

bernd authored 15 years ago

69)   <input type="hidden" name="token" value="'.$token.'" /><input type="hidden" name="agb" value="1" /></p>
bernd one-time-URLs für systemuser

bernd authored 15 years ago

70)   <p><span class="login_label">Neues Passwort:</span> <input type="password" name="password" size="30" /></p>
71)   <p><span class="login_label">Bestätigung:</span> <input type="password" name="password2" size="30" /></p>
72)   <p><span class="login_label">&#160;</span> <input type="submit" value="Passwort setzen" /></p>
73)   '));
74) }
bernd AGB bestätigen lassen

bernd authored 15 years ago

75) elseif ($show == 'agb')
76) {
bernd Benutze überall title() sta...

bernd authored 13 years ago

77)   title("Bestätigung unserer AGB");
78)   output('<p>Die Nutzung unseres Angebots ist an unsere <a href="http://www.schokokeks.org/agb">Allgemeinen Geschäftsbedingungen</a> gebunden. Bitte lesen Sie diese Bedingungen und bestätigen Sie Ihr Einverständnis. Sollten Sie diese Bedingungen nicht akzeptieren, setzen Sie sich bitte mit uns in Verbindung.</p>'.
bernd AGB bestätigen lassen

bernd authored 15 years ago

79)   html_form('initialize_useraccount_agb', '', '', '<p style="display: none"><input type="hidden" name="uid" value="'.$uid.'" />
80)   <input type="hidden" name="token" value="'.$token.'" /></p>
81)   <p><span class="login_label">&#160;</span><input type="checkbox" name="agb" value="1" /> Ja, ich akzeptiere die AGB.<p>
82)   <p><span class="login_label">&#160;</span> <input type="submit" value="Weiter" /></p>
83)   '));
84) }
bernd one-time-URLs für systemuser

bernd authored 15 years ago

85) elseif ($show == 'token')
86) {
bernd Benutze überall title() sta...

bernd authored 13 years ago

87)   title("Neues Passwort setzen");
88)   output('<p>Bitte rufen Sie die Adresse aus Ihrer Begrüßungs-E-Mail auf um ein neues Passwort zu setzen.');