Skip to main content

.get_user_from_script()

A function that extracts the user name of a script owner based on the full formatted script name.

Syntax

#fs.scripts.lib().get_user_from_script(scriptname);

Parameters

scriptname

The string representation of a script name, e.g. "scripts.trust".

Return

Returns a string.

Example

function(context, args) {
const l = #fs.scripts.lib();
const scriptname = "scripts.trust";

return l.get_user_from_script(scriptname);
}