summaryrefslogtreecommitdiffstats
path: root/hosted
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-07-11 18:05:19 +0200
committerTorsten Grote <grote@kolabsys.com>2012-07-11 18:05:19 +0200
commit31d4f7419a63029a64de35dc3945b6d48e8b841d (patch)
treee92417476628552a01e6e42946feaf98cc6ab80e /hosted
parent99445492c8cdba2bbfc6e8a34d528f172c3afd59 (diff)
downloadwebadmin-31d4f7419a63029a64de35dc3945b6d48e8b841d.tar.gz
improved hosted session handling, fixed user checking and made signup work
Diffstat (limited to 'hosted')
-rw-r--r--hosted/js/kolab_hosted.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/hosted/js/kolab_hosted.js b/hosted/js/kolab_hosted.js
index 1252cbf..793dde0 100644
--- a/hosted/js/kolab_hosted.js
+++ b/hosted/js/kolab_hosted.js
@@ -27,7 +27,7 @@ kadm.user_save = function(reload, section)
var data = kadm.serialize_form('#'+this.env.form_id);
// check email address
- if(!isValidEmailAddress(data.mailalternateaddress)) {
+ if(typeof data.mailalternateaddress != 'undefined' && !isValidEmailAddress(data.mailalternateaddress)) {
// TODO use translatable error message
kadm.display_message('Please provide a valid email adress as this is where your password will be sent to.', 'error');
kadm.form_value_error('mailalternateaddress');
@@ -67,6 +67,9 @@ kadm.check_user_availability = function()
// update future mail form field
$('input[name="mail"]').val(mail);
+ // switch domain before checking for user availability
+ kadm.http_post('signup.check_user', {data: {'domain': data['domain']}});
+
// check if user with that email address already exists
kadm.api_post('users.list', {'search': {'mail': {'value': mail} } }, 'check_user_availability_response');
} else {