File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,17 @@ def verify_destroying_user
9797 end
9898
9999 def destroy_user
100- user = authenticate_current_user
101- token = VerificationToken . delete_user . find_by! ( user : user , token : params [ :id ] )
102- username = user . login
103- sign_out if current_user == user
104- user . destroy
105- redirect_to root_url , notice : "The account #{ username } has been permanently destroyed."
100+ im_sure = params [ :id ]
101+ if im_sure != "1"
102+ redirect_to verify_destroying_user_url , notice : "Please check the checkbox after you have read the instructions."
103+ else
104+ user = authenticate_current_user
105+ token = VerificationToken . delete_user . find_by! ( user : user , token : params [ :id ] )
106+ username = user . login
107+ sign_out if current_user == user
108+ user . destroy
109+ redirect_to root_url , notice : "The account #{ username } has been permanently destroyed."
110+ end
106111 end
107112
108113 def send_destroy_email
Original file line number Diff line number Diff line change 55 < ul >
66 < li > You will lose all your acquired exercise points. We will not be able to recover them.</ li >
77 < li > You will not be able to receive a grade from any TestMyCode course.</ li >
8- < li > We will not be able to verify the authencity of any certificates that you have generated.</ li >
8+ < li > We will not be able to verify the authenticity of any certificates that you have generated.</ li >
99 < ul >
1010</ div >
1111
You can’t perform that action at this time.
0 commit comments