Proyectos de Subversion LeadersLinked - Services

Rev

Rev 108 | Rev 120 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 108 Rev 119
Línea 1790... Línea 1790...
1790
        return new JsonModel([
1790
        return new JsonModel([
1791
            'success' => false,
1791
            'success' => false,
1792
            'data' => 'ERROR_METHOD_NOT_ALLOWED'
1792
            'data' => 'ERROR_METHOD_NOT_ALLOWED'
1793
        ]);
1793
        ]);
1794
    }
1794
    }
-
 
1795
    
-
 
1796
    public function autologinAction()
-
 
1797
    {
-
 
1798
        $email = 'santiago.olivera@leaderslinked.com';
-
 
1799
        $network_id = 1;
-
 
1800
        
-
 
1801
        $authAdapter = new AuthEmailAdapter($this->adapter);
-
 
1802
        $authAdapter->setData($email, $network_id);
-
 
1803
        
-
 
1804
        $authService = new AuthenticationService();
-
 
1805
        $result = $authService->authenticate($authAdapter);
-
 
1806
        
-
 
1807
        
-
 
1808
        if ($result->getCode() == AuthResult::SUCCESS) {
-
 
1809
            return $this->redirect()->toRoute('dashboard');
-
 
1810
        } else {
-
 
1811
            throw new \Exception($result->getMessages()[0]);
-
 
1812
        }
-
 
1813
        
-
 
1814
        
-
 
1815
    }
1795
}
1816
}