Skip to content

Commit

Permalink
support profile mapper through env var
Browse files Browse the repository at this point in the history
  • Loading branch information
jfromaniello committed Mar 9, 2016
1 parent 2b3448b commit e528adf
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/users.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var nconf = require('nconf');
var ldap = require('ldapjs');
var async = require('async');
var nconf = require('nconf');
var ldap = require('ldapjs');
var async = require('async');
var ldap_clients = require('./ldap');
var cb = require('cb');
var graph = require('./graph');
var cb = require('cb');
var graph = require('./graph');

var AccountDisabled = require('./errors/AccountDisabled');
var AccountExpired = require('./errors/AccountExpired');
Expand All @@ -14,7 +14,10 @@ var WrongPassword = require('./errors/WrongPassword');
var WrongUsername = require('./errors/WrongUsername');
var UnexpectedError = require('./errors/UnexpectedError');

var profileMapper = require('./profileMapper');
var profileMapper = nconf.get('PROFILE_MAPPER') ?
eval(nconf.get('PROFILE_MAPPER')) :
require('./profileMapper');

var _ = require('lodash');

function logger(userName) {
Expand Down

0 comments on commit e528adf

Please sign in to comment.