Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

setup_command_line_user()

Description

Set up a dummy user with required permissions etc. to pass permission checks if running scripts from the command line

e.g.
["username" => "My Application",
"permissions" => "h,v,e0",
"groupname => "My Application",
"resource_defaults => "region=EMEA",
]

Parameters

ColumnTypeDefaultDescription
$setoptions array
can these
t
v
e-2
e-1
e0
e1
e2
true;
any plus columns_in"user"
null
columns_in"usergroup"
$options[]] array Array of optional user options. Will default to generic system admin permissions if not set

Return

bool *

This article was last updated 5th December 2024 07:05 Europe/London time based on the source file dated 4th December 2024 16:25 Europe/London time.