| Línea 12... |
Línea 12... |
| 12 |
use LeadersLinked\Authentication\AuthOneTimePasswordAdapter;
|
12 |
use LeadersLinked\Authentication\AuthOneTimePasswordAdapter;
|
| 13 |
use Laminas\Authentication\AuthenticationService;
|
13 |
use Laminas\Authentication\AuthenticationService;
|
| Línea 14... |
Línea 14... |
| 14 |
|
14 |
|
| 15 |
use Laminas\View\Model\JsonModel;
|
15 |
use Laminas\View\Model\JsonModel;
|
| - |
|
16 |
use Laminas\View\Model\ViewModel;
|
| Línea 16... |
Línea 17... |
| 16 |
use Laminas\View\Model\ViewModel;
|
17 |
use LeadersLinked\Model\CalendarEvent;
|
| 17 |
|
18 |
|
| 18 |
|
19 |
|
| Línea 123... |
Línea 124... |
| 123 |
$company_uuid = filter_var($this->params()->fromQuery('company_uuid'), FILTER_SANITIZE_STRING);
|
124 |
$company_uuid = filter_var($this->params()->fromQuery('company_uuid'), FILTER_SANITIZE_STRING);
|
| 124 |
$user_uuid = filter_var($this->params()->fromQuery('user_uuid'), FILTER_SANITIZE_STRING);
|
125 |
$user_uuid = filter_var($this->params()->fromQuery('user_uuid'), FILTER_SANITIZE_STRING);
|
| 125 |
$timestamp = filter_var($this->params()->fromQuery('time'), FILTER_SANITIZE_STRING);
|
126 |
$timestamp = filter_var($this->params()->fromQuery('time'), FILTER_SANITIZE_STRING);
|
| 126 |
$password = filter_var($this->params()->fromQuery('password'), FILTER_SANITIZE_STRING);
|
127 |
$password = filter_var($this->params()->fromQuery('password'), FILTER_SANITIZE_STRING);
|
| 127 |
$rand = filter_var($this->params()->fromQuery('rand'), FILTER_SANITIZE_NUMBER_INT);
|
128 |
$rand = filter_var($this->params()->fromQuery('rand'), FILTER_SANITIZE_NUMBER_INT);
|
| - |
|
129 |
$relational = filter_var($this->params()->fromQuery('relational'), FILTER_SANITIZE_STRING);
|
| - |
|
130 |
$type = filter_var($this->params()->fromQuery('type'), FILTER_SANITIZE_STRING);
|
| Línea 128... |
Línea 131... |
| 128 |
|
131 |
|
| 129 |
if(empty($user_uuid) || empty($company_uuid) || empty($user_uuid) || empty($timestamp) || empty($password) || empty($rand)) {
|
132 |
if(empty($user_uuid) || empty($company_uuid) || empty($user_uuid) || empty($timestamp) || empty($password) || empty($rand)) {
|
| 130 |
return new JsonModel([
|
133 |
return new JsonModel([
|
| 131 |
'success' => false,
|
134 |
'success' => false,
|
| Línea 139... |
Línea 142... |
| 139 |
$authService = new AuthenticationService();
|
142 |
$authService = new AuthenticationService();
|
| 140 |
$result = $authService->authenticate($authAdapter);
|
143 |
$result = $authService->authenticate($authAdapter);
|
| Línea 141... |
Línea 144... |
| 141 |
|
144 |
|
| - |
|
145 |
|
| - |
|
146 |
if($result->getCode() == AuthResult::SUCCESS) {
|
| - |
|
147 |
|
| - |
|
148 |
switch($type)
|
| - |
|
149 |
{
|
| - |
|
150 |
case CalendarEvent::TYPE_PERFORMANCE_EVALUATION :
|
| - |
|
151 |
|
| - |
|
152 |
$this->cache->setItem('ACTIVITY_CENTER_RELATIONAL', $relational);
|
| - |
|
153 |
|
| - |
|
154 |
$route = 'activities-center/performance-evaluation';
|
| - |
|
155 |
break;
|
| - |
|
156 |
|
| - |
|
157 |
default :
|
| - |
|
158 |
$route = 'dashboard';
|
| - |
|
159 |
break;
|
| - |
|
160 |
|
| 142 |
|
161 |
}
|
| - |
|
162 |
|
| - |
|
163 |
return $this->redirect()->toRoute($route);
|
| - |
|
164 |
|
| 143 |
if($result->getCode() == AuthResult::SUCCESS) {
|
165 |
|
| 144 |
return $this->redirect()->toRoute('dashboard');
|
166 |
|
| 145 |
} else {
|
167 |
} else {
|
| 146 |
throw new \Exception($result->getMessages()[0]);
|
168 |
throw new \Exception($result->getMessages()[0]);
|