Kimai_Database_Mysql::userIDToName PHP Method

userIDToName() public method

return name of a user with specific ID
Author: th
public userIDToName ( string $id ) : integer
$id string the user's userID
return integer
    public function userIDToName($id)
    {
        $filter['userID'] = MySQL::SQLValue($id, MySQL::SQLVALUE_NUMBER);
        $columns[] = "name";
        $table = $this->kga['server_prefix'] . "users";
        $result = $this->conn->SelectRows($table, $filter, $columns);
        if ($result == false) {
            $this->logLastError('userIDToName');
            return false;
        }
        $row = $this->conn->RowArray(0, MYSQLI_ASSOC);
        return $row['name'];
    }
Kimai_Database_Mysql