Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | <?php |
2 | |||
3 | daniel-mar | 3 | if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
2 | daniel-mar | 4 | |
5 | if ($ib_user_type == 0) |
||
6 | { |
||
7 | die($header.'Keine Zugriffsberechtigung'.$footer); |
||
8 | } |
||
9 | |||
10 | if ($aktion == 'activate') |
||
11 | { |
||
12 | $hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); |
||
13 | |||
14 | $new_secret_key = ''; |
||
15 | for ($i=0; $i<255; $i++) |
||
16 | { |
||
17 | $new_secret_key .= $hex[mt_rand(0, 15)]; |
||
18 | } |
||
19 | |||
20 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."users` SET `fastlogin_secret` = '".$new_secret_key."' WHERE `id` = '".$benutzer['id']."'"); |
||
8 | daniel-mar | 21 | if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul)); |
2 | daniel-mar | 22 | } |
23 | |||
24 | if ($aktion == 'deactivate') |
||
25 | { |
||
26 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."users` SET `fastlogin_secret` = '' WHERE `id` = '".$benutzer['id']."'"); |
||
8 | daniel-mar | 27 | if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul)); |
2 | daniel-mar | 28 | } |
29 | |||
3 | daniel-mar | 30 | ?> |