Jabber-Passwort ändern
bernd

bernd commited on 2007-06-01 17:07:05
Zeige 1 geänderte Dateien mit 15 Einfügungen und 0 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@482 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -68,6 +68,21 @@ function create_jabber_account($local, $domain, $password)
68 68
 }
69 69
 
70 70
 
71
+
72
+function change_jabber_password($id, $newpass)
73
+{
74
+  require_role(ROLE_CUSTOMER);
75
+  $customerno = (int) $_SESSION['customerinfo']['customerno'];
76
+  $id = (int) $id;
77
+  $newpass = mysql_real_escape_string($newpass);
78
+  
79
+  $query = "UPDATE jabber.accounts SET password='{$newpass}' WHERE customerno={$customerno} AND id={$id} LIMIT 1";
80
+  DEBUG($query);
81
+  mysql_query($query);
82
+}
83
+
84
+
85
+
71 86
 function delete_jabber_account($id)
72 87
 {
73 88
   require_role(ROLE_CUSTOMER);
74 89