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

WIP: Issues 1384 #1836

Merged
merged 4 commits into from
Jul 10, 2017
Merged

Conversation

raftaar1191
Copy link
Contributor

@raftaar1191 raftaar1191 commented Jul 10, 2017

Description
This PR is for #1384

How Has This Been Tested?
Tested this with for Donations, Donors, Log Requests.

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.

Showing message when user login in from givewp form that s/he has successfully login to the sites
Add JS to closed the message box after 5 second
@raftaar1191 raftaar1191 changed the title Issues 1384 WIP: Issues 1384 Jul 10, 2017
Copy link
Collaborator

@ravinderk ravinderk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raftaar1191 I like the way you implement it. I added following suggestions, Please check them.

@@ -230,7 +236,18 @@ function give_process_form_login() {
give_log_user_in( $user_data['user_id'], $user_data['user_login'], $user_data['user_pass'] );

if ( $is_ajax ) {
echo 'success';
$data['status'] = 'success';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Commit id: raftaar1191@41bf6bf

@@ -219,7 +220,12 @@ function give_process_form_login() {
*
* @since 1.0
*/
do_action( 'give_ajax_donation_errors' );
ob_start();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Commit id: raftaar1191@41bf6bf

sprintf(
/* translators: %s: user first name */
esc_html__( 'Welcome %s! You have successfully logged into your account.', 'give' ),
$user_data['user_first']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raftaar1191 user_first can be empty , so show user_login in that situation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Commit id: raftaar1191@41bf6bf

Code refactor as per WP standard
sprintf(
/* translators: %s: user first name */
esc_html__( 'Welcome %s! You have successfully logged into your account.', 'give' ),
( isset( $user_data['user_first'] ) && ! empty( $user_data['user_first'] ) ) ? $user_data['user_first'] : $user_data['user_login']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raftaar1191 Do not use isset, empty will check for both

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@ravinderk ravinderk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DevinWalker You can review it. Working fine for me.

@DevinWalker
Copy link
Member

This works well. Thanks!

@DevinWalker DevinWalker merged commit b0afd5d into impress-org:release/1.8.10 Jul 10, 2017
Copy link
Member

@DevinWalker DevinWalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well

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