Do you really want to delete this user permanently?
+ This will delete all account data and withdraw the permission to access the email account.
+ Please note that this action cannot be undone.
Do you really want to delete this user permanently?
- This will delete all account data and withdraw the permission to access the email account.
- Please note that this action cannot be undone.
-
-
-
-
-
@@ -86,46 +52,6 @@
this.users = response.data
})
.catch(this.$root.errorHandler)
- },
- methods: {
- deleteUser(id) {
- let dialog = $('#delete-warning').modal('hide')
-
- // Delete the user from the confirm dialog
- if (!id && this.current_user) {
- id = this.current_user.id
- axios.delete('/api/v4/users/' + id)
- .then(response => {
- if (response.data.status == 'success') {
- this.$toast.success(response.data.message)
- $('#user' + id).remove()
- }
- })
-
- return
- }
-
- // Deleting self, redirect to /profile/delete page
- if (id == this.$store.state.authInfo.id) {
- this.$router.push({ name: 'profile-delete' })
- return
- }
-
- // Display the warning
- if (this.current_user = this.getUser(id)) {
- dialog.find('.modal-title').text('Delete ' + this.current_user.email)
- dialog.on('shown.bs.modal', () => {
- dialog.find('button.modal-cancel').focus()
- }).modal()
- }
- },
- getUser(id) {
- for (let i = 0; i < this.users.length; i++) {
- if (this.users[i].id == id) {
- return this.users[i]
- }
- }
- }
}
}
diff --git a/src/resources/vue/User/Profile.vue b/src/resources/vue/User/Profile.vue
--- a/src/resources/vue/User/Profile.vue
+++ b/src/resources/vue/User/Profile.vue
@@ -2,7 +2,16 @@