Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 255 Rev 256
Línea 304... Línea 304...
304
 
304
 
Línea 305... Línea 305...
305
                    $this->logger->info('Ingreso a LeadersLiked', ['user_id' => $user->id, 'ip' => Functions::getUserIP()]);
305
                    $this->logger->info('Ingreso a LeadersLiked', ['user_id' => $user->id, 'ip' => Functions::getUserIP()]);
Línea -... Línea 306...
-
 
306
 
-
 
307
                    $user_share_invitation = $this->cache->getItem('user_share_invitation');
-
 
308
 
-
 
309
                    $url =  $this->url()->fromRoute('dashboard');
306
 
310
                    
-
 
311
                    if ($user_share_invitation && is_array($user_share_invitation)) {
-
 
312
                        
-
 
313
                        $content_uuid = $user_share_invitation['code'];
-
 
314
                        $content_type = $user_share_invitation['type'];
-
 
315
                        $content_user = $user_share_invitation['user'];
307
                    $user_share_invitation = $this->cache->getItem('user_share_invitation');
316
                        
308
 
317
                        
309
                    if ($user_share_invitation) {
318
                        
310
                        $userRedirect = $userMapper->fetchOneByUuid($user_share_invitation);
319
                        $userRedirect = $userMapper->fetchOneByUuid($content_user);
Línea 311... Línea 320...
311
                        if ($userRedirect && $userRedirect->status == User::STATUS_ACTIVE && $user->id != $userRedirect->id) {
320
                        if ($userRedirect && $userRedirect->status == User::STATUS_ACTIVE && $user->id != $userRedirect->id) {
Línea 324... Línea 333...
324
                                $connection->status = Connection::STATUS_ACCEPTED;
333
                                $connection->status = Connection::STATUS_ACCEPTED;
Línea 325... Línea 334...
325
 
334
 
326
                                $connectionMapper->insert($connection);
335
                                $connectionMapper->insert($connection);
327
                            }
336
                            }
-
 
337
                        }
-
 
338
                        
-
 
339
                        if($content_type == 'feed') {
-
 
340
                            $url = $this->url()->fromRoute('dashboard', ['feed' => $content_uuid ]);
-
 
341
                            
-
 
342
                        }
-
 
343
                        else if($content_type == 'post') {
-
 
344
                            $url = $this->url()->fromRoute('post', ['id' => $content_uuid ]);
-
 
345
                        }
-
 
346
                        else {
-
 
347
                            $url = $this->url()->fromRoute('dashboard');
-
 
348
                        }
-
 
349
                        
-
 
350
                    }
-
 
351
                    
-
 
352
                    
-
 
353
                    $hostname = empty($_SERVER['HTTP_HOST']) ?  '' : $_SERVER['HTTP_HOST'];
-
 
354
                    
-
 
355
                    $networkMapper = NetworkMapper::getInstance($this->adapter);
-
 
356
                    $network = $networkMapper->fetchOneByHostnameForFrontend($hostname);
-
 
357
                    
-
 
358
                    if(!$network) {
328
                        }
359
                        $network = $networkMapper->fetchOneByDefault();
-
 
360
                    }
-
 
361
                    
-
 
362
                    $hostname = trim($network->main_hostname);
Línea 329... Línea 363...
329
                    }
363
                    $url = 'https://' . $hostname . $url;
330
 
364
 
331
                    
365
                    
332
                   
366
                   
333
 
-
 
334
                    $data = [
367
 
335
                        'success'   => true,
368
                    $data = [
Línea 336... Línea 369...
336
                        'data'      => [
369
                        'success'   => true,
337
                            'password_xmpp' => $password_xmpp,
370
                        'data'      => [