allow signups while using alternative auth backend(2)
This commit is contained in:
parent
c253df7bc9
commit
f82f2d8b07
2 changed files with 6 additions and 1 deletions
|
@ -166,6 +166,11 @@ pandora.ui.accountForm = function(action, value) {
|
|||
pandora.signin(result.data);
|
||||
pandora.ui.accountWelcomeDialog().open();
|
||||
} else {
|
||||
Ox.forEach(result.data.errors, function(value, key) {
|
||||
if (['username', 'password', 'email'].indexOf(key) > -1) {
|
||||
that.setMessages([{id: key, message: Ox._(result.data.errors[key])}]);
|
||||
}
|
||||
});
|
||||
pandora.$ui.accountDialog.enableButtons();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -97,7 +97,7 @@ pandora.validateUser = function(key, existing) {
|
|||
value: value,
|
||||
operator: '=='
|
||||
}, function(result) {
|
||||
var valid = existing == !!result.data.users.length;
|
||||
var valid = (existing == !!result.data.users.length) || pandora.site.site.dontValidateUser;
|
||||
callback({
|
||||
message: existing ?
|
||||
Ox._('Unknown ' + string) :
|
||||
|
|
Loading…
Reference in a new issue