X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/b1082e6ec27ca11586bd786b65f509d1a20220f6..cbc2ae6c2e83edfe7b4242b7dd2f9bfb1359820e:/WEB-INF/lib/ttUserHelper.class.php diff --git a/WEB-INF/lib/ttUserHelper.class.php b/WEB-INF/lib/ttUserHelper.class.php index 2ff774ff..42d7c910 100644 --- a/WEB-INF/lib/ttUserHelper.class.php +++ b/WEB-INF/lib/ttUserHelper.class.php @@ -120,11 +120,7 @@ class ttUserHelper { // Now deal with project assignment. if (!is_a($affected, 'PEAR_Error')) { - $sql = "SELECT LAST_INSERT_ID() AS last_id"; - $res = $mdb2->query($sql); - $val = $res->fetchRow(); - $last_id = $val['last_id']; - + $last_id = $mdb2->lastInsertID('tt_users', 'id'); $projects = isset($fields['projects']) ? $fields['projects'] : array(); if (count($projects) > 0) { // We have at least one project assigned. Insert corresponding entries in tt_user_project_binds table.