My current work-around:
init.sqf:
{
if (isPlayer _x) then
{
_x setVariable ["name", name _x];
};
} forEach playableUnits;
event_onPlayerConnected =
{
private ["_id", "_name", "_uid"];
_id = _this select 0;
_name = _this select 1;
_uid = _this select 2;
{
scopeName "loop";
if (isPlayer _x && {_uid == getPlayerUID _x}) then
{
_x setVariable ["name", name _x];
breakOut "loop";
};
} forEach playableUnits;
};
onPlayerConnected "[_id, _name, _uid] call event_onPlayerConnected";
// Then somePlayer getVariable "name"; to get the name of the player.