Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnect and reconnect user functionality through ajax. #1727

Closed
wants to merge 1 commit into from

Conversation

emgk
Copy link
Contributor

@emgk emgk commented May 24, 2017

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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@ravinderk
Copy link
Collaborator

@emgk Thank for PR, we will review it.

@DevinWalker
Copy link
Member

Hi @emgk - I reviewed the PR and the code is good, but I'm not a fan of how the reconnect logic currently works nor do I feel it's necessary. See my comment on the issue #1720 - As well, with the current PR code if you refresh the page the message and reconnect logic is gone. You're not saving the previous connected user_id to the donor's meta so the admin can reconnect back at any time. I've modified your PR so you will get commit credit here #1736

@emgk emgk deleted the issue-1720 branch May 26, 2017 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants