1LimoLabsAutoCabApp.controller('RegisterController', [ 2 '$rootScope', 3 '$scope', 4 '$state', 5 '$filter', 6 'AuthService', 7 'UsersService', 8 'SettingsService', 9 'EVENTS', 10 'CONFIG', 11 'TRANSLATION', 12 'toastr', 13 function ($rootScope, $scope, $state, $filter, Auth, Users, Settings, EVENTS, CONFIG, TRANSLATION, toastr) { 14 15 if (Auth.hasIdentity()) { 16 $state.go('booking.widget'); 17 return; 18 } 19 20 $scope.register = function (Account) { 21 var CountryCodeID = ''; 22 23 Users.register(Account.FirstName, Account.LastName, Account.Phone, CountryCodeID, Account.Email, Account.Password).then( 24 function () { 25 $rootScope.sendEventToLimoLabsLoginWidget(EVENTS.BOOKING_WIDGET_REGISTERED); 26 27 toastr.success(TRANSLATION.registration_success, TRANSLATION.success_title); 28 29 Auth.authenticate(Account.Email, Account.Password).then(function () { 30 $rootScope.sendEventToLimoLabsLoginWidget(EVENTS.BOOKING_WIDGET_LOGGED_IN); 31 if (CONFIG.force_login_go_to_checkout) { 32 $rootScope.return_to_checkout = false; 33 $state.go('booking.checkout'); 34 } else { 35 $state.go('booking.select-vehicle'); 36 } 37 }); 38 }); 39 } 40 41 $scope.showLogin = function () { 42 $state.go('admin.login'); 43 }; 44 } 45]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.