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
97
97
end
98
98
99
99
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
106
111
end
107
112
108
113
def send_destroy_email
Original file line number Diff line number Diff line change 5
5
< ul >
6
6
< li > You will lose all your acquired exercise points. We will not be able to recover them.</ li >
7
7
< 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 >
9
9
< ul >
10
10
</ div >
11
11
You can’t perform that action at this time.
0 commit comments