63a0529b21bfd97a4ef395e8d3d3f513526357c6
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

1) <?php
2) 
3) require_once('session/start.php');
4) 
5) require_once('useraccounts.php');
6) 
7) require_once('inc/security.php');
8) 
9) 
10) require_role(ROLE_CUSTOMER);
11) 
12) require_once("inc/debug.php");
13) global $debugmode;
14) 
15) if ($_GET['action'] == 'new')
16) {
17)   system_failure('not implemented');
18)   /*
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

19)   check_form_token('systemuser_new');
20)   if (filter_input_username($_POST['username']) == '' ||
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

21)       filter_shell($_POST['password']) == '')
22)   {
23)     input_error('Sie müssen alle Felder ausfüllen!');
24)   }
25)   else
26)   {
27)     create_jabber_account($_POST['local'], $_POST['domain'], $_POST['password']);
28)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

29)       header('Location: accounts');
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

30)   }
31)   */
32) }
33) elseif ($_GET['action'] == 'edit')
34) {
35)   $error = false;
36)   check_form_token('systemuser_edit');
bernd nicht mehr der user mit der...

bernd authored 16 years ago

37)   if (customer_useraccount($_POST['uid']))
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

38)     system_failure('Aus Sicherheitsgründen können Sie diesen Account nicht ändern!');
39) 
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

40)   if ($_POST['newpass'] != '')
41)   {
bernd Primärer Useraccount kann d...

bernd authored 16 years ago

42)     //if (! strong_password($_POST['newpass']))
43)     //  input_error('Das Passwort ist zu einfach');
44)     //else
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

45)     if ($_POST['newpass2'] == '' ||
46)         $_POST['newpass'] != $_POST['newpass2'])
47)     {
48)       input_error('Bitte zweimal ein neues Passwort eingeben!');
49)       $error = true;
50)     }
51)     else
52)     {
53)       $user = get_account_details($_POST['uid']);
54)       # set_systemuser_password kommt aus den Session-Funktionen!
55)       set_systemuser_password($user['uid'], $_POST['newpass']);
56)     }
57)   }
58) 
59)   set_systemuser_details($_POST['uid'], $_POST['fullname'], $_POST['quota']);
60)   if (! ($debugmode || $error))
bernd eliminate .php extensions f...

bernd authored 15 years ago

61)     header('Location: accounts');
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

62)   
63) }
64) elseif ($_GET['action'] == 'delete')
65) {
66)   system_failure("Benutzeraccounts zu löschen ist momentan nicht über diese Oberfläche möglich. Bitte wenden Sie sich an einen Administrator.");
67)   /*
68)   $account_string = filter_input_general( $account['local'].'@'.$account['domain'] );
69)   $sure = user_is_sure();
70)   if ($sure === NULL)
71)   {
72)     are_you_sure("action=delete&amp;account={$_GET['account']}", "Möchten Sie den Account »{$account_string}« wirklich löschen?");
73)   }
74)   elseif ($sure === true)
75)   {
76)     delete_jabber_account($account['id']);
77)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

78)       header("Location: accounts");
bernd Systemuser-Modul hinzugefügt

bernd authored 16 years ago

79)   }
80)   elseif ($sure === false)
81)   {
82)     if (! $debugmode)
bernd eliminate .php extensions f...

bernd authored 15 years ago

83)       header("Location: accounts");