Steve
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Multisite: Settings API vs Options APIAwesome! Thank you for taking the time to reply. This makes sense to me. I’ll re-implement my plugin using the Options API and creating the forms manually.
Forum: Plugins
In reply to: [Content Expiration] works great !Hi @fcpro,
Thanks for the feedback! I have been busy, but will scheduled some time to work on this plugin. I added an issue on GitHub to support translations and configure the default settings.
I will work on this soon and make a new release!
Thanks,
srgForum: Hacks
In reply to: Disabling Email Changes – Not WorkingHi @bcworkz,
Thanks for the response. I tried to override $_POST[’email’] as you mentioned, but it doesn’t seem to be working still.
I have an if statement that checks if $_POST[’email’] is different from what’s currently in the DB. It seems that when I try to change the email on the Profile Edit page, $_POST[’email’] still has the OLD email address, not the new one. I used error_log() to debug this. My code is below (the code is stripped of other functions for simplicity).
In my code above, is it a bug that
pre_user_first_name
,pre_user_last_name
, andpre_user_nickname
work fine, butpre_user_email
does not? If so, should I file a bug report?<?php new StopEmailChange(); class StopEmailChange { public function __construct() { add_action('admin_init', array($this, 'add_admin_hooks')); } public function add_admin_hooks() { add_action('personal_options_update', array($this, 'disable_profile_fields_post')); } public function disable_profile_fields_post() { add_filter('pre_user_first_name', function () { $UserObj = wp_get_current_user(); return $UserObj->first_name; }); add_filter('pre_user_last_name', function () { $UserObj = wp_get_current_user(); return $UserObj->last_name; }); add_filter('pre_user_nickname', function () { $UserObj = wp_get_current_user(); return $UserObj->user_nicename; }); // The above add_filter() won't work for email addresses for some reason. Instead, just modify $_POST directly. $UserObj = wp_get_current_user(); error_log('User Email in DB: ' . $UserObj->user_email); if (isset($_POST['email'])) { error_log('POSTemail is set: ' . $_POST['email']); if ($_POST['email'] != $UserObj->user_email) { error_log('Email has changed in POST; changing back.'); $_POST['email'] = $UserObj->user_email; } } } } ?>
In my PHP error log, this is printing:
[03-Jan-2017 16:06:29 UTC] User Email in DB: [email protected] [03-Jan-2017 16:06:29 UTC] POSTemail is set: [email protected]
Even though I am trying to change my email to [email protected]. It never gets inside that last if statement.
Thank you!
- This reply was modified 7 years, 10 months ago by Steve.
Hi @wfalaa,
Thanks for the response and info. I read the link you gave. I still get the impression that this is IP-based lockouts. If my username is “srg” and I mistype “srgg”, does it only lock out the “srgg” account? Meaning, I can still login immediately with the correct “srg” account?
I think the best solution would be for us to setup ssl offloading on our reverse proxy so that we can get the real IP address of the user.
Thanks,
SteveForum: Plugins
In reply to: [FeedWordPress] BROKEN with the WordPress 4.7 updateedit: Ignore, I didn’t see the other pages of discussion.
- This reply was modified 7 years, 11 months ago by Steve.
Thanks, I’ll do that.
Forum: Themes and Templates
In reply to: [Quintus] Redirect Loop with Quintus ThemeHi @siobhyb,
I looked at your first link (tommcfarlin.com), and it seemed to be specific to domain-based multisite. We are using a folder-based multisite. Logging in on the sites work fine, the errors appear when a user is browsing to the site.
I believe it is specific to Quintus because it only happens on sites using the Quintus theme. I tested this by creating a new site and using the Twenty Twelve theme. No errors in the php or apache logs. Then I switched to the Quintus theme and the errors started appearing. I switched back and the errors were gone. I did not modify the content on the site during the test and I was browsing in an Incognito window without being logged in.
My current .htaccess contains the following, which is exactly as the Network Admin Dashboard -> Network Setup page tells me to have:
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^([_0-9a-zA-Z-\+\-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]
Thanks!
Forum: Fixing WordPress
In reply to: PHP Errors: dirname() and basename()I don’t know how long this error has been occurring for. I just noticed it today.
- No, WP was not updated.
- No, plugins were not modified.
- No, themes were not modified.
- This is a large multisite and we have 33 themes installed. A few are custom coded and all others are from www.ads-software.com
- Core and almost all plugins are up to date. 2 plugins are outdated. The update is scheduled per our change-management procedures.
- Yes, the server was migrated to new hardware. The domain name and directories are exactly the same. This was about a month ago.
- The site has been and still is working properly, except I’m seeing this PHP warning.
- This is the server error log.
Thanks!
- This reply was modified 8 years ago by Steve.
Forum: Fixing WordPress
In reply to: PHP Redirect LoopIt seems to be happening only on sites with the quintus theme (this is a multisite). I’m posting a support request in their forum.
Forum: Plugins
In reply to: [FeedWordPress] Disabling the Creation of New UsersThanks for the info @neotrope. I know I can manually change the setting to create new users for syndicated feeds, but I was hoping there was a way to force this network-wide. My multisite has ~2,000 sites, each with their own admins. It’s not practical to go into each site and change the setting.
- This reply was modified 8 years ago by Steve.
Forum: Plugins
In reply to: [Plotly] Plugin does not have a valid header.It looks like this is due to the unicode character in the Author’s name in the plugin header.
Forum: Plugins
In reply to: [More Privacy Options] Toggle network admin e-mailHi David,
Is this still being worked on? I, too, would love an option for this.
Thanks,
SteveForum: Plugins
In reply to: [Classifieds WP] HTTP Error When Uploading ImagesHm, I tested this out with another browser and it worked. I’m not sure what it was, but I suspect it was my adblocker that was causing the issue. It’s weird because I was able to upload the image through the WordPress dashboard, but not through ClassifiedsWP.
I marked the topic as resolved. I’ll follow up if I find out any additional details. Thanks!
Forum: Plugins
In reply to: [Classifieds WP] Contact Info VisibilityI would also be very interested in a feature like this. If I have time, I can modify the plugin to add such a feature.
Forum: Plugins
In reply to: [Classifieds WP] Questions: MultisiteThanks!