@@ -13,7 +13,6 @@ import {
1313 DISABLE_ACCOUNT ,
1414 ENABLE_ACCOUNT ,
1515 REMOVE_2FA ,
16- SEND_PASSWORD_RESET_EMAIL ,
1716 UNSUBSCRIBE_FROM_MAILING_LISTS ,
1817 UNVERIFY_EMAIL ,
1918} from './index.gql' ;
@@ -143,16 +142,6 @@ export const DangerZone = ({
143142 } ,
144143 } ) ;
145144
146- const [ sendPasswordResetEmail ] = useMutation ( SEND_PASSWORD_RESET_EMAIL , {
147- onCompleted : ( ) => {
148- window . alert ( `Password reset email sent to ${ email . email } ` ) ;
149- onCleared ( ) ;
150- } ,
151- onError : ( ) => {
152- window . alert ( 'Error sending password reset email.' ) ;
153- } ,
154- } ) ;
155-
156145 const [ recordAdminSecurityEvent ] = useMutation ( RECORD_ADMIN_SECURITY_EVENT ) ;
157146
158147 const handleDisable = ( ) => {
@@ -181,13 +170,6 @@ export const DangerZone = ({
181170 } ) ;
182171 } ;
183172
184- const handleSendPasswordReset = ( ) => {
185- if ( ! window . confirm ( 'Are you sure?' ) ) {
186- return ;
187- }
188- sendPasswordResetEmail ( { variables : { email : email . email } } ) ;
189- } ;
190-
191173 // define loading messages
192174 const loadingMessage = 'Please wait a moment...' ;
193175 let unverifyMessage = '' ;
@@ -254,17 +236,6 @@ export const DangerZone = ({
254236 />
255237 </ Guard >
256238 ) }
257- < Guard features = { [ AdminPanelFeature . SendPasswordResetEmail ] } >
258- < DangerZoneAction
259- header = "Send Password Reset Email"
260- description = "Send the user a password reset email to all verified emails. For
261- Sync users this will also reset their encryption key so make sure
262- they have a backup of Sync data."
263- buttonHandler = { handleSendPasswordReset }
264- buttonText = "Password Reset"
265- buttonTestId = "password-reset-button"
266- />
267- </ Guard >
268239 < Guard features = { [ AdminPanelFeature . UnsubscribeFromMailingLists ] } >
269240 < DangerZoneAction
270241 header = "Unsubscribe From Mailing Lists"
0 commit comments