[英]Rails 4 devise4.2:How to use the admin account to change the user mailbox, but do not send validation mail
當我更改用戶的電子郵件時,設計自動將確認指令電子郵件發送到目標電子郵件。如何取消此操作?
user = User.last
user.email = "foo@example.com"
user.save
#the result is
user.email => "bar@example.com"
user.unconfirmed_email => "foo@example.com"
可能可以幫助其他用戶
user = User.last
user.skip_reconfirmation!
user.email = "foo@example.com"
user.save
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.