diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 472929144..62347713c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -22,7 +22,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user.rb,v 1.77 2008-12-04 15:03:42 francis Exp $ +# $Id: user.rb,v 1.78 2008-12-18 18:55:22 francis Exp $ require 'digest/sha1' @@ -219,6 +219,11 @@ class User < ActiveRecord::Base self.admin_level == 'super' end + # Returns domain part of user's email address + def email_domain + return PublicBody.extract_domain_from_email(self.email) + end + private def self.encrypted_password(password, salt) |