forked from Telodendria/Telodendria
[MOD] Don't hardcode creator
This commit is contained in:
parent
3fe5402f32
commit
9c60bb3bcb
1 changed files with 3 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue