No email for user if added by admin
This commit is contained in:
parent
4b169cf2e0
commit
2b4fa96b74
|
@ -16,6 +16,10 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||||
user = User.find(params[:users_new_interface_id])
|
user = User.find(params[:users_new_interface_id])
|
||||||
user.approved = true
|
user.approved = true
|
||||||
user.save
|
user.save
|
||||||
|
desk = user.desktop
|
||||||
|
desk.theme = DesktopTheme.first.id.to_s
|
||||||
|
desk.wallpaper = nil
|
||||||
|
desk.save!
|
||||||
redirect_to admin_users_new_interface_registration_approval_path
|
redirect_to admin_users_new_interface_registration_approval_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -168,10 +172,9 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||||
# }
|
# }
|
||||||
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
|
||||||
# binding.pry
|
# binding.pry
|
||||||
@user.confirmation_token = nil
|
@user.skip_confirmation!
|
||||||
@user.confirmed_at = Time.now
|
|
||||||
@user.approved = true
|
@user.approved = true
|
||||||
|
|
||||||
if !flash.now[:error] && @user.save
|
if !flash.now[:error] && @user.save
|
||||||
desk = @user.desktop
|
desk = @user.desktop
|
||||||
desk.theme = DesktopTheme.first.id.to_s
|
desk.theme = DesktopTheme.first.id.to_s
|
||||||
|
|
Reference in New Issue