// insert - inserts a user into database.
static function insert($fields, $hash = true) {
+ global $user;
$mdb2 = getConnection();
$password = $mdb2->quote($fields['password']);
$status_f = ', status';
$status_v = ', '.$mdb2->quote($fields['status']);
}
+ $created_ip_v = ', '.$mdb2->quote($_SERVER['REMOTE_ADDR']);
+ $created_by_v = ', '.$mdb2->quote($user->id);
- $sql = "insert into tt_users (name, login, password, team_id, role_id, client_id, rate, email $status_f) values (".
+ $sql = "insert into tt_users (name, login, password, team_id, role_id, client_id, rate, email, created, created_ip, created_by $status_f) values (".
$mdb2->quote($fields['name']).", ".$mdb2->quote($fields['login']).
- ", $password, $team_id, ".$mdb2->quote($fields['role_id']).", ".$mdb2->quote($fields['client_id']).", $rate, ".$mdb2->quote($email)." $status_v)";
+ ", $password, $team_id, ".$mdb2->quote($fields['role_id']).", ".$mdb2->quote($fields['client_id']).", $rate, ".$mdb2->quote($email).", now() $created_ip_v $created_by_v $status_v)";
$affected = $mdb2->exec($sql);
// Now deal with project assignment.
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.53.4100 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.54.4101 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>