[MOD] Don't hardcode creator

This commit is contained in:
lda 2023-11-04 22:43:51 +01:00
parent 3fe5402f32
commit 9c60bb3bcb
Signed by: lda
GPG key ID: 6898757653ABE3E6

View file

@ -210,6 +210,8 @@ RegTokenJSON(RegTokenInfo * info)
return NULL;
}
/* TODO: Consider adding the tokinfo property into
* the RegTokenInfo struct to make that easier. */
tokinfo.name = info->name;
tokinfo.created_on = info->created;
tokinfo.expires_on = info->expires;
@ -224,13 +226,7 @@ RegTokenJSON(RegTokenInfo * info)
* to -1 */
tokinfo.uses = info->uses;
}
if (!(tokinfo.created_by = info->owner))
{
/* The owner can be null if Telodendria created it.
* Since users can't contain a space, it is in this case set to
* "Telodendria Server". */
tokinfo.created_by = "Telodendria Server";
}
tokinfo.created_by = info->owner;
return TokenInfoToJson(&tokinfo);