diff --git a/modules/core/server/controllers/errors.server.controller.js b/modules/core/server/controllers/errors.server.controller.js index db81a8ec86..935a9299d4 100644 --- a/modules/core/server/controllers/errors.server.controller.js +++ b/modules/core/server/controllers/errors.server.controller.js @@ -8,10 +8,10 @@ var getUniqueErrorMessage = function(err) { try { var fieldName = err.err.substring(err.err.lastIndexOf('.$') + 2, err.err.lastIndexOf('_1')); - output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exist'; + output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exists'; } catch(ex) { - output = 'Unique field already exist'; + output = 'Unique field already exists'; } return output; diff --git a/modules/users/client/config/users.client.routes.js b/modules/users/client/config/users.client.routes.js index 9b0546360e..4c00bc0651 100644 --- a/modules/users/client/config/users.client.routes.js +++ b/modules/users/client/config/users.client.routes.js @@ -36,7 +36,7 @@ angular.module('users').config(['$stateProvider', templateUrl: 'modules/users/views/authentication/signup.client.view.html' }). state('authentication.signin', { - url: '/signin', + url: '/signin?err', templateUrl: 'modules/users/views/authentication/signin.client.view.html' }). state('password', { diff --git a/modules/users/client/controllers/authentication.client.controller.js b/modules/users/client/controllers/authentication.client.controller.js index a1b349f4f1..fed9225718 100644 --- a/modules/users/client/controllers/authentication.client.controller.js +++ b/modules/users/client/controllers/authentication.client.controller.js @@ -4,6 +4,9 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$http function($scope, $http, $location, Authentication) { $scope.authentication = Authentication; + // Get an eventual error defined in the URL query string: + $scope.error = $location.search().err; + // If user is signed in then redirect back home if ($scope.authentication.user) $location.path('/'); diff --git a/modules/users/client/views/authentication/signin.client.view.html b/modules/users/client/views/authentication/signin.client.view.html index 5345a5dc6c..0d78a1391f 100644 --- a/modules/users/client/views/authentication/signin.client.view.html +++ b/modules/users/client/views/authentication/signin.client.view.html @@ -18,12 +18,12 @@