You can get the current user with
$user = site()->user();
if($user) {
$username = $user->username();
}
Honestly, I don’t know if it makes sense to use the username or not. As far as I know, the fingerprint should be something unique. The original fingerprint is created like this:
public static function fingerprint() {
// custom fingerprint callback
if(is_callable(static::$fingerprint)) {
return call(static::$fingerprint);
}
if(!r::cli()) {
return sha1(Visitor::ua() . (ip2long($_SERVER['REMOTE_ADDR']) & ip2long('255.255.0.0')));
} else {
return '';
}
}
For testing if it makes any difference at all for your sessions , I’d use any simple string.