From 00e88cc2de41b40206ebe92c99d03a67b9adae5e Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Wed, 30 Oct 2019 23:30:34 -0500 Subject: [PATCH] Pledge Form: Always insert `user_login` for consistency. df78e3de80f8116d6e14c358fa23f1e6dab4d22e started allowing `user_nicename`s in the form field, but we need to always create the contributor posts with the `user_login`, because there are many other places in the code that expect the `post_title` to be the `user_login` and not the `user_nicename`. See #57 --- plugins/wporg-5ftf/includes/pledge-form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wporg-5ftf/includes/pledge-form.php b/plugins/wporg-5ftf/includes/pledge-form.php index 88edf65..bfe0e93 100755 --- a/plugins/wporg-5ftf/includes/pledge-form.php +++ b/plugins/wporg-5ftf/includes/pledge-form.php @@ -322,7 +322,7 @@ function parse_contributors( $contributors ) { } if ( $user instanceof WP_User ) { - $sanitized_contributors[] = $sanitized_username; + $sanitized_contributors[] = $user->user_login; } else { $invalid_contributors[] = $wporg_username; }