added emailAddress relation

This commit is contained in:
Taras Machyshyn
2014-01-08 18:35:35 +02:00
parent 5061a319d0
commit ab29dbaf49
8 changed files with 180 additions and 153 deletions
+5 -4
View File
@@ -52,14 +52,15 @@ class Auth extends \Slim\Middleware
$user = $this->entityManager->getRepository('User')->findOne(array(
'whereClause' => array(
'userName' => $username,
'password' => md5($password)
),
));
if ($user instanceof \Espo\Entities\User) {
if ($password == $user->get('password')) {
$this->container->setUser($user);
$isAuthenticated = true;
}
$this->entityManager->setUser($user);
$this->container->setUser($user);
$isAuthenticated = true;
}
//$isAuthenticated = true;