forked from External/greenlight
GRN2-6: Added the ability for admins to specify registration method (#520)
* Added the ability to invite users * Small bug fix * Added the ability to approve/decline users * Small bug fixes * More bug fixes * More minor changes * Final changes
This commit is contained in:
committed by
Jesus Federico
parent
adf4b68008
commit
720dac6012
@ -1,13 +1,18 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserMailerPreview < ActionMailer::Preview
|
||||
def initialize
|
||||
@logo = "https://raw.githubusercontent.com/bigbluebutton/greenlight/master/app/assets/images/logo_with_text.png"
|
||||
@color = "#467fcf"
|
||||
end
|
||||
|
||||
# Preview this email at
|
||||
# http://localhost:3000/rails/mailers/user_mailer/password_reset
|
||||
def password_reset
|
||||
user = User.first
|
||||
user.reset_token = User.new_token
|
||||
url = "http://example.com" + "/password_resets/" + user.reset_token + "/edit?email=" + user.email
|
||||
UserMailer.password_reset(user, url)
|
||||
UserMailer.password_reset(user, url, @logo, @color)
|
||||
end
|
||||
|
||||
# Preview this email at
|
||||
@ -15,6 +20,19 @@ class UserMailerPreview < ActionMailer::Preview
|
||||
def verify_email
|
||||
user = User.first
|
||||
url = "http://example.com" + "/u/verify/confirm/" + user.uid
|
||||
UserMailer.verify_email(user, url)
|
||||
UserMailer.verify_email(user, url, @logo, @color)
|
||||
end
|
||||
|
||||
# Preview this email at
|
||||
# http://localhost:3000/rails/mailers/user_mailer/invite_email
|
||||
def invite_email
|
||||
UserMailer.invite_email("Example User", "from@example.com", "http://example.com/signup", @logo, @color)
|
||||
end
|
||||
|
||||
# Preview this email at
|
||||
# http://localhost:3000/rails/mailers/user_mailer/approve_user
|
||||
def approve_user
|
||||
user = User.first
|
||||
UserMailer.approve_user(user, "http://example.com/", @logo, @color)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user