No email for user if added by admin

This commit is contained in:
saurabhbhatia 2013-12-04 14:38:22 +08:00
parent 4b169cf2e0
commit 2b4fa96b74
1 changed files with 6 additions and 3 deletions

View File

@ -16,6 +16,10 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
user = User.find(params[:users_new_interface_id])
user.approved = true
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
end
@ -168,10 +172,9 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
# }
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
# binding.pry
@user.confirmation_token = nil
@user.confirmed_at = Time.now
@user.skip_confirmation!
@user.approved = true
if !flash.now[:error] && @user.save
desk = @user.desktop
desk.theme = DesktopTheme.first.id.to_s