summaryrefslogtreecommitdiff
path: root/users/app/models
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-10 10:38:48 +0100
committerAzul <azul@leap.se>2012-12-10 10:38:48 +0100
commite4c7f2fb8fa2833037508f1b88f802944855fd77 (patch)
tree0514506d3b64861b8a5877145e1a3212c76af4b9 /users/app/models
parent9d99d340cfd3c55f21d38c1ba9f3f4574e40c46c (diff)
actually allow adding email aliases
Diffstat (limited to 'users/app/models')
-rw-r--r--users/app/models/user.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/users/app/models/user.rb b/users/app/models/user.rb
index 81d5262..3ad69c7 100644
--- a/users/app/models/user.rb
+++ b/users/app/models/user.rb
@@ -75,6 +75,13 @@ class User < CouchRest::Model::Base
APP_CONFIG['admins'].include? self.login
end
+ def email_aliases_attributes=(attrs)
+ if attrs
+ email_alias = EmailAlias.new(attrs.values.first)
+ email_aliases << email_alias
+ end
+ end
+
protected
def password
password_verifier