lib/origen/users/user.rb in origen-0.36.0 vs lib/origen/users/user.rb in origen-0.36.1
- old
+ new
@@ -42,14 +42,15 @@
options[:body] ||= options[:message]
options[:to] = self
Origen.mailer.send_email(options)
end
- def id
+ def id(options = {})
@id.to_s.downcase
end
alias_method :core_id, :id
+ alias_method :username, :id
# Returns true if the user is an admin for the current application
def admin?
role == :admin
end
@@ -71,10 +72,10 @@
def name_from_rc
RevisionControl::Git.user_name
end
- def email
+ def email(options = {})
if current?
@email ||= ENV['ORIGEN_EMAIL'] || email_from_rc || begin
if Origen.site_config.email_domain
"#{id}@#{Origen.site_config.email_domain}"
end