Support invite codes for verification of email

Also changes the system so we don't apply the invite until it is called explicitly from the frontend

Fixes #241
This commit is contained in:
Joseph Schorr 2015-07-16 15:00:51 +03:00
parent 5d86fa80e7
commit 687bab1c05
7 changed files with 3185 additions and 35 deletions

View file

@ -35,11 +35,13 @@ angular.module('quay').directive('signupForm', function () {
mixpanel.alias($scope.newUser.username);
}
if (!$scope.awaitingConfirmation) {
$scope.userRegistered({'username': $scope.newUser.username});
if (!$scope.awaitingConfirmation && !$scope.inviteCode) {
document.location = '/';
}
$scope.userRegistered({'username': $scope.newUser.username});
UserService.load();
}, function(result) {
$scope.registering = false;
UIService.showFormError('#signupButton', result);