1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | var
|
13 | joola = global.joola,
|
14 | ce = require('cloneextend'),
|
15 | _datatables = require('../objects/datatables'),
|
16 | connector = require('../connectors/connector');
|
17 |
|
18 | exports.login = function (username, password, next) {
|
19 | var user = joola.config.auth.organizations[0].users[joola.config.auth.organizations[0].users.length - 1];
|
20 | if (user) {
|
21 | joola.logger.info('Joola authentication success [' + username + ']...');
|
22 | return next(user);
|
23 | }
|
24 | else
|
25 | throw new Error('No users found.');
|
26 | }; |
\ | No newline at end of file |