Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16248 Rev 16286
Línea 1601... Línea 1601...
1601
                    $last_name = $record['last_name'];
1601
                    $last_name = $record['last_name'];
1602
                    $password = $record['password'];
1602
                    $password = $record['password'];
1603
                    $email = $record['email'];
1603
                    $email = $record['email'];
Línea 1604... Línea 1604...
1604
                    
1604
                    
1605
                    
1605
                    
1606
                    $user = $userMapper->fetchOneByEmail($email);
1606
                    $user = $userMapper->fetchOneByEmailAndNetworkId($email, $currentNetwork->id);
Línea 1607... Línea 1607...
1607
                    if(!$user) {
1607
                    if(!$user) {
1608
                        $password_hash = password_hash($password, PASSWORD_DEFAULT);
1608
                        $password_hash = password_hash($password, PASSWORD_DEFAULT);
Línea 1622... Línea 1622...
1622
                        
1622
                        
1623
                        $result = $userMapper->insert($user);
1623
                        $result = $userMapper->insert($user);
1624
                        if($result) {
1624
                        if($result) {
Línea 1625... Línea 1625...
1625
                            $users_created++;
1625
                            $users_created++;
1626
                            
-
 
Línea 1627... Línea 1626...
1627
                            $country = $countryMapper->fetchOneByCodeOrCountry($record['country']);
1626
                            
1628
                            if($country) {
-
 
1629
                            
1627
                            $country_code = trim($record['country']);
1630
                                $location = new Location();
1628
                            
Línea -... Línea 1629...
-
 
1629
                            if($country_code) {
-
 
1630
                                $country = $countryMapper->fetchOneByCodeOrCountry($record['country']);
-
 
1631
                                if($country) {
-
 
1632
                                
-
 
1633
                                    $location = new Location();
1631
                                $location->formatted_address = $country->country;
1634
                                    $location->formatted_address = $country->country;
1632
                                $location->country = $country->country;
1635
                                    $location->country = $country->country;
-
 
1636
                                    if($locationMapper->insert($location)) {
-
 
1637
                                    
1633
                                if($locationMapper->insert($location)) {
1638
                                        $user->location_id = $location->id;
1634
                                
-
 
-
 
1639
                                        $userMapper->updateLocation($user);
-
 
1640
                                    }
1635
                                    $user->location_id = $location->id;
1641
                                    
Línea 1636... Línea 1642...
1636
                                    $userMapper->updateLocation($user);
1642
                                }
1637
                                }
1643
                            } else {
1638
                                
1644
                                $country_code = '';