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

Latest WP Update (4.9.2) changes user-new.php file. #1132

Open
crazycoolcam opened this issue Jan 16, 2018 · 6 comments
Open

Latest WP Update (4.9.2) changes user-new.php file. #1132

crazycoolcam opened this issue Jan 16, 2018 · 6 comments

Comments

@crazycoolcam
Copy link

@crazycoolcam crazycoolcam commented Jan 16, 2018

EXPLANATION OF THE ISSUE

My site just upgraded to 4.9.2 but s2member's patches could not verify one file:
-->Your /wp-admin/user-new.php file could NOT be patched. Unverifiable.

The line s2member is expecting is:
wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );

The line has now been changed to read:
wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' => get_current_blog_id(), 'new_role' => $_REQUEST['role'] ) );

Please update the search script to account for this change. I'd love to see this file patched automatically again. Thanks!

@scortillion
Copy link

@scortillion scortillion commented Apr 29, 2018

I just upgraded to WP 4.9.5 I get the same error. Plus I cannot add new users from the Super Admin account. What gives?

@OlafDammann
Copy link

@OlafDammann OlafDammann commented Apr 30, 2019

Any news on this one? I see exactly the same error on WP5.1.1MS

@crazycoolcam
Copy link
Author

@crazycoolcam crazycoolcam commented Apr 30, 2019

This is still an open issue from what I can tell.

Not sure what happened with it but the lastest official word I've received on this can be found on this thread.

Hope this helps.

@clavaque
Copy link
Contributor

@clavaque clavaque commented Jun 5, 2019

@crazycoolcam I'm working on this for the next release, and wanted to ask about your experience with the patches in the past. Do you only apply manually the user-new.php patch after it failed, or do you patch all the files manually?

I ask because the instructions I see for the wp-login.php file don't seem to match what the patch is doing, and I was wondering if you have experienced any problems with the signups. If not, then the patch is most likely fine, and the instructions a bit outdated only.

I look forward to your input. Thanks! :)

@crazycoolcam
Copy link
Author

@crazycoolcam crazycoolcam commented Jun 5, 2019

Hi Cristián,
I generally like to use the automatic patch, and will only manually patch it when it has failed. When manually patching, I will look at the intent of the patch (adding a filter or something to that effect), and then add it into the file using whatever the latest formatting is for that line (or lines) of code. I've noticed two or more changes to the formatting of the line in question.

I'm not exactly sure what the patch does, but I suspect it has to do with allowing tasks (likely levels and/or capabilities) to be immediately added to users on their registration.

I've not noticed any problems with signups, but I also don't get signups very frequently. (My site is multisite, but not a blog-farm. I use one or two user levels, but mainly custom capabilities.)

Let me know if you have any other questions.

~Cam

@clavaque
Copy link
Contributor

@clavaque clavaque commented Jun 5, 2019

Gotcha. Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants