X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/a468ccc781de1988967194b2bf89e6b7a404e716..7905a1bf102ca6b3cef20dad2d249f415c614eeb:/WEB-INF/lib/ttRegistrator.class.php diff --git a/WEB-INF/lib/ttRegistrator.class.php b/WEB-INF/lib/ttRegistrator.class.php index 1664461b..b122d015 100644 --- a/WEB-INF/lib/ttRegistrator.class.php +++ b/WEB-INF/lib/ttRegistrator.class.php @@ -145,13 +145,15 @@ class ttRegistrator { function createGroup() { $mdb2 = getConnection(); + $group_key = $mdb2->quote(ttRandomString()); $name = $mdb2->quote($this->group_name); $currency = $mdb2->quote($this->currency); $lang = $mdb2->quote($this->lang); $created = 'now()'; $created_ip = $mdb2->quote($_SERVER['REMOTE_ADDR']); - $sql = "insert into tt_groups (name, currency, lang, created, created_ip) values($name, $currency, $lang, $created, $created_ip)"; + $sql = "insert into tt_groups (group_key, name, currency, lang, created, created_ip)". + " values($group_key, $name, $currency, $lang, $created, $created_ip)"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false;