Home Features Pricing Support Contact
Search:     Advanced search

Using Auto Authentication

Article ID: 326
Last updated: 28 Jan, 2014

Auto authentication allows you to automatically authenticate users.

Steps to enable Auto Authentication

  • Set the setting Auto authentication to 1 - ON, user will be logged in automatically  in the Settings > LDAP Authentication tab
  • Set the setting File path to where your _remoteAutoAuth defined, set it to default for default file (admin/lib/custom/remote_auth_auto.php
  • Customize the _remoteAutoAuth function to catch current user data and return it
  • Rename the function _remoteAutoAuth to remoteAutoAuth

Customizing the remoteAutoAuth function

In your installation there is a folder admin/lib/custom. Within that folder is a file called remote_auth.php. This file contains the _remoteAutoAuth function. Customize this function to get the current user's credentials.

On success, the function remoteAutoAuth should return an associative array with keys (username, password) for the user.  For example: array('username'=>'John', 'password'=>'Test').

Here is a simple example of the function customized using HTTP authentication:

function remoteAutoAuth() {
    $user = false;
    if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
         $user = array();
         $user['username'] = $_SERVER['PHP_AUTH_USER'];
         $user['password'] = $_SERVER['PHP_AUTH_PW'];

    return $user; 

Debugging auto-remote authentication

You can debug auto-authentication by setting Auto authentication to 2 - ON, debug mode  in the Settings > LDAP Authentication tab, which allows you to continually try relogging in so that you can fix any problems without having to start over every time.

Important: Don't forget to reset this back to 1 (or 0) when you have finished debugging.

Article ID: 326
Last updated: 28 Jan, 2014
Revision: 5
Views: 7068
Comments: 0
Print Export to PDF Subscribe Share Add comment
This article was:   Helpful | Not helpful
Attached files
file remote_auth_auto.php.txt (1 kb)

Also listed in
folder User Manual v5.5 -> Changes for release 5.0 -> LDAP Authentication

Prev   Next
Setting up Remote Authentication     Advanced Authentication (and in version 4.5 and below)