Disconnect and reconnect user functionality through ajax. #1727
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1720
This code will show confirmation box when admin click on
disconnect user
link on donor's details page. Once the user is disconnected, it will show message or give option that if admin wants to reconnect the previous user to donor again?For reconnect functionality, as @mehul0810 described solution for #1720 issue, if we store user id along with the user and donor meta data tables, it's fair solution for the users and donors which is going to be created newly but not for which are already exists ( as we will not able to find the proper meta values to maintain the reconnect functionality ) and it may break the reconnect functionality. I hope this makes sense.
So what I have done in this PR that, it will give option to reconnect the previous user to donor again until admin reloads the page.
Kindly let me know, if I need to make any changes.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: