Knowledgebase: User Manual
User Authentication
Posted by - NA -, Last modified by Mark [Elevated X Support] on 22 April 2015 12:19 PM

User Authentication

Note - This is intended for use in integrating with custom auth setup or 3rd party scripts and assisting with this type of implementation, testing or troubleshooting is not considered part of our standard product support.

By default, the CMS looks at the following two variables in PHP to check for a username:

  $_SERVER["PHP_AUTH_USER"]
  $_SERVER["REMOTE_USER"]

It IS possible to override the CMS using this and use a custom function to determine the username.  This is used for integrating with third party scripts.

1) In cmsinclude.ini.php, under the [flags] portion, you will want to add a line that overrides the standard internal username function:
AUTHFUNC=MyCustomAuthFunc

2) You will then want to include an additional PHP file that will contain your custom function.  For help on this, see the following article:
https://support.elevatedx.com/index.php?/Knowledgebase/Article/View/85/0/integrate-custom-php-code

3) Within this additional PHP file, you'll want to define your function:

function MyCustomAuthFunc()
{
  // custom code goes here that sets the variable $username

  return $username;
}

Once set up, the system will return the username.  As for Join Date, the system will automatically count the join date as the moment the user first logs into the system.

(4 vote(s))
Helpful
Not helpful

Comments (0)