Disable confirmation email for guest user
This commit is contained in:
parent
e4cc6d543b
commit
c62b8d4d37
|
@ -28,9 +28,10 @@ module ApplicationHelper
|
||||||
def create_guest_user
|
def create_guest_user
|
||||||
u = nil
|
u = nil
|
||||||
User.without_callback(:create, :before, :initialize_desktop) do
|
User.without_callback(:create, :before, :initialize_desktop) do
|
||||||
u = User.create(:name => "guest", :email => "guest_#{Time.now.to_i}#{rand(99)}@example.com")
|
u = User.create(:name => "guest", :email => "guest_#{Time.now.to_i}#{rand(99)}@example.com")
|
||||||
end
|
end
|
||||||
u.admin = false
|
u.admin = false
|
||||||
|
u.skip_confirmation!
|
||||||
u.save(:validate => false)
|
u.save(:validate => false)
|
||||||
u
|
u
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue