Pharos 8.0 User Namespace Function Interface for Pharos Script

Blog Post created by toleary on Aug 2, 2013

The User Namespace is designed to replace the DB Namespace as the method for loading user accounts from the Pharos database for purposes such as adding new users, editing user accounts and authentication & billing. This provides a standard interface which will preclude the requirement to upgrade scripts in the situation that the internal Pharos database changes between versions.

The User Namespace has been designed to be executed within a Try/Catch block. This means all potential errors that could be thrown during a User command can handled without having to manage every call.

Only one user can be loaded at a time, loading a subsequent user will replace the existing user within the script context. If a User.GetUser function results in the return of multiple users an error will be throw, as is the case if no users are returned. As you can only search for a user based on a single column in the user table, using the DB Namespace may still be required in some circumstances.

The Pharos Script Primer with Pharos Help includes detailed information on the User Namespace.

Several example scripts are included with this article that show various functions. These scripts are complete, functional scripts, however they are provided "as-is" and no additional support is provided for these specific scripts. If you have custom requirements, please contact Pharos Professional Services:

+1 (585) 249 8889 option 2