MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
mauthdb.class
Ir para a documentação deste ficheiro.
1<?php
2class MAuthDb extends MAuth
3{
4 function Authenticate($userId, $pass)
5 {
6 $this->manager->LogMessage("[LOGIN] Authenticating $user");
7 $login = NULL;
8
9 try
10 {
11 $user = $this->manager->GetBusinessMAD('user');
12 $user->GetByLoginPass($userId, $pass);
13
14 if ($user->login)
15 {
16 $login = new MLogin($user);
17
18 if ($this->manager->GetConf("options.dbsession"))
19 {
20 $session = $this->manager->GetBusinessMAD('session');
21 $session->LastAccess($login);
22 $session->RegisterIn($login);
23 }
24
25 $this->SetLogin($login);
26 $this->manager->LogMessage("[LOGIN] Authenticated $userId");
27 }
28 else
29 {
30 $this->manager->LogMessage("[LOGIN] $userId NOT Authenticated");
31 }
32 }
33 catch( Exception $e )
34 {
35 $this->manager->LogMessage("[LOGIN] $userId NOT Authenticated - " . $e->GetMessage());
36 }
37
38 return $login;
39 }
40}
41?>
Authenticate($userId, $pass)
Definição mauthdb.class:4
Definição mauth.class:3
SetLogin($login)
Definição mauth.class:14
$login
Definição mauth.class:4