Title: michaelrich's Replies | WordPress.org

---

# michaelrich

  [  ](https://wordpress.org/support/users/michaelrich/)

 *   [Profile](https://wordpress.org/support/users/michaelrich/)
 *   [Topics Started](https://wordpress.org/support/users/michaelrich/topics/)
 *   [Replies Created](https://wordpress.org/support/users/michaelrich/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/michaelrich/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/michaelrich/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/michaelrich/engagements/)
 *   [Favorites](https://wordpress.org/support/users/michaelrich/favorites/)

 Search replies:

## Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Frontend Admin by DynamiApps] Bug: Submissions page stuck on page 1 after update](https://wordpress.org/support/topic/bug-submissions-page-stuck-on-page-1-after-update/)
 *  Thread Starter [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [1 year ago](https://wordpress.org/support/topic/bug-submissions-page-stuck-on-page-1-after-update/#post-18475583)
 * I think I found the cause and fixed it:
   The `get_submissions()` method in the
   file `main/admin/admin-pages/submissions/crud.php` doesn’t correctly use the 
   page number. It tries to get the page number from `$_REQUEST['current_page']`,
   but WordPress list tables use a URL parameter called `paged`. Because `$_REQUEST['
   current_page']` isn’t set, the code always defaults to showing page 1. The correct
   page number _is_ actually passed to the function as an argument, but the function
   overwrites it.
 * **The Fix:**
 * To fix this, the `get_submissions()` method in `main/admin/admin-pages/submissions/
   crud.php` needs to be changed to use the arguments passed to it, especially `
   current_page`.
 * **Code Change:**
 * Inside the `public static function get_submissions( $args = array() )` method
   in `main/admin/admin-pages/submissions/crud.php`:
 * **1. Remove this block of code (which incorrectly resets `$args`):**
 *     ```wp-block-code
       			// This part is causing the problem by overwriting $args
       			$args = [
       				'orderby'      => isset( $_REQUEST['orderby'] ) ? sanitize_key( $_REQUEST['orderby'] ) : '',
       				'order'        => isset( $_REQUEST['order'] ) ? strtoupper( sanitize_text_field( $_REQUEST['order'] ) ) : '',
       				'per_page'     => isset( $_REQUEST['per_page'] ) ? (int) $_REQUEST['per_page'] : 10,
       				'current_page' => isset( $_REQUEST['current_page'] ) ? max( 1, (int) $_REQUEST['current_page'] ) : 1,
       			];
       ```
   
 * **2. Add this code in its place (to correctly use passed arguments and set defaults):**
 *     ```wp-block-code
       			// Define default values
       			$defaults = [
       				'orderby'      => 'created_at',
       				'order'        => 'DESC',
       				'per_page'     => 20, // Or use the screen option default
       				'current_page' => 1,
       			];
   
       			// Merge incoming $args with $defaults.
       			// This ensures that if 'current_page' is passed in $args, it's used.
       			$args = wp_parse_args( $args, $defaults );
   
       			// Keep the existing sanitization for the now correctly populated $args
       			$args['orderby'] = sanitize_key( $args['orderby'] );
       			$args['order']   = strtoupper( sanitize_text_field( $args['order'] ) );
       			$args['per_page'] = (int) $args['per_page'];
       			$args['current_page'] = max( 1, (int) $args['current_page'] );
       ```
   
 * This change ensures the function uses the correct page number provided by WordPress’s
   list table system, fixing the pagination.
 * BTW: I think 20 is way better as a default then 10.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[UpdraftPlus: WP Backup & Migration Plugin] UpdraftPlus Backup without Personal Email Addresses – GDPR Compliance](https://wordpress.org/support/topic/updraftplus-backup-without-personal-email-addresses-gdpr-compliance/)
 *  Thread Starter [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/updraftplus-backup-without-personal-email-addresses-gdpr-compliance/#post-18297126)
 * Hi Nick,
 * Thanks for your quick response. I understand that the free version doesn’t offer
   database encryption. However, I’m a paid user of UpdraftPlus, and I’m still very
   interested in exploring options to anonymize email addresses in backups for GDPR
   compliance. It doesn’t help to encrypt the database when the clone is running
   on a server.
 * While I appreciate the concern that searching and replacing emails could cause
   problems, I believe a simple checkbox option during backup – to replace email
   addresses with placeholders – could be implemented safely with a well-defined
   logic. This would be incredibly valuable for GDPR compliance.
 * To illustrate what I mean, here’s a simplified PHP snippet that demonstrates 
   the basic idea of replacing email addresses in a database dump _before_ the backup
   is created. This is just a conceptual example, of course, but it shows the potential:
 *     ```wp-block-code
       // Anonymize email addresses (example)$sql = "UPDATE users SET user_email = CONCAT('user', ID, '@example.invalid') WHERE user_email NOT LIKE '%@yourdomain.com%'"; //Excluding main domainif ($conn->query($sql) === TRUE) {  echo "Email addresses anonymized successfully";} else {  echo "Error anonymizing email addresses: " . $conn->error;}$conn->close();
       ```
   
 * Given the increasing importance of GDPR and data privacy, I believe this feature
   would be a significant selling point for UpdraftPlus, especially for users in
   the EU.
 * Thanks again for your time and consideration.
 * Michael
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Approving users after update not working anymore.](https://wordpress.org/support/topic/approving-users-after-update-not-working-anymore/)
 *  Thread Starter [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/approving-users-after-update-not-working-anymore/#post-18223057)
 * For some reason I cannot reactivate a user with:
 *     ```wp-block-code
       UM()->common()->users()->approve($user_id, true);
       ```
   
 * I also do not get any error in my error logs if I try it.
 * Is this even the right way to re-enable a user after I deactivated him?
   I also
   tried:
 *     ```wp-block-code
       UM()->common()->users()->set_status('approved', $user_id);
       ```
   
 * what did also not work.
   For reference, I used the following code before the Ultimate
   Member update:
 *     ```wp-block-code
       um_fetch_user($user_id);UM()->user()->approve();
       ```
   
 * And replaced it with:
 *     ```wp-block-code
       UM()->common()->users()->approve($user_id, true);
       ```
   
 * That is how it was mentioned in the release notes. But it does not work…
   As a
   sanity check I also tried:
 *     ```wp-block-code
       UM()->common()->users()->set_as_pending($user_id, true);
       ```
   
 * An that worked. Are you sure the other functions are working properly? Did I 
   do anything wrong?
    -  This reply was modified 1 year, 5 months ago by [michaelrich](https://wordpress.org/support/users/michaelrich/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Update 2.8.9 – Breaking Changes in User Data Retrieval](https://wordpress.org/support/topic/update-2-8-9-breaking-changes-in-user-data-retrieval/)
 *  Thread Starter [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/update-2-8-9-breaking-changes-in-user-data-retrieval/#post-18120841)
 * Thank you very much, at first glance, it seems to have fixed the issue!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Question about deleting the plugin](https://wordpress.org/support/topic/question-about-deleting-the-plugin/)
 *  [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/question-about-deleting-the-plugin/#post-18095513)
 * Isn’t Ultimate Member using normal WordPress roles?
   If yes, why should they get
   removed?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Frontend Admin by DynamiApps] Bug: Cannot approve posts with Version 3.21.0](https://wordpress.org/support/topic/bug-cannot-approve-posts-with-version-3-21-0/)
 *  Thread Starter [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years ago](https://wordpress.org/support/topic/bug-cannot-approve-posts-with-version-3-21-0/#post-17796055)
 * Unfortunately, the bug has not been fixed in Version 3.21.1.
 * Now, after approving a post, I no longer land on the start page, but the post
   is not created either.
 * The backend shows ‘approved’ in the submissions, but it doesn’t appear …
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Frontend Admin by DynamiApps] Cannot approve posts issue](https://wordpress.org/support/topic/cannot-approve-posts-issue/)
 *  [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years ago](https://wordpress.org/support/topic/cannot-approve-posts-issue/#post-17766527)
 * **Update:** The latest version, 3.20.12, appears to be functioning well again.
 * It would have been nice to receive a response from support here…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Activity Log] security vulnerability](https://wordpress.org/support/topic/security-vulnerability-132/)
 *  [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/security-vulnerability-132/#post-17761486)
 * It seems like you can only exploit it if you are an administrator anyway… But
   it is very concerning for me that the developer is not reacting here.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Frontend Admin by DynamiApps] Cannot approve posts issue](https://wordpress.org/support/topic/cannot-approve-posts-issue/)
 *  [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/cannot-approve-posts-issue/#post-17748625)
 * I also now updated from version 3.19.7 to version 3.20.7, and I cannot approve
   posts anymore. As soon as I press the approval button, I land on the start page,
   but the post is not approved/does not appear on my start page. Version 3.19.7
   seems to work fine.
 * I also hope for a fix, otherwise we cannot update. Everything above version 3.19.7
   should not get installed at the moment.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Someone seems to leak mail adresses of my users](https://wordpress.org/support/topic/someone-seems-to-leak-mail-adresses-of-my-users/)
 *  [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/someone-seems-to-leak-mail-adresses-of-my-users/#post-17306556)
 * I had the same problem and added the following code to my functions.php
 * > >     ```wp-block-code
   > >     function my_um_member_directory_core_search_fields( $core_search_fields ) {
   > >     $core_search_fields = array_flip( $core_search_fields );
   > >     unset( $core_search_fields['user_email'] );
   > >     $core_search_fields = array_flip( $core_search_fields );
   > >     return $core_search_fields;
   > >     }
   > >     add_filter( 'um_member_directory_core_search_fields', 'my_um_member_directory_core_search_fields' );
   > >     ```
   > > 
 * But it has no effect, the mail-addresses are still searched for. Should this 
   still work?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WSMS (formerly WP SMS) – SMS & MMS Notifications with OTP and 2FA for WooCommerce] Error trying to send SMS since Version 6.5](https://wordpress.org/support/topic/error-trying-to-send-sms-since-version-6-5/)
 *  Thread Starter [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-trying-to-send-sms-since-version-6-5/#post-17304537)
 * Thank you very much, your code is working and restores the functionality. 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Use of login form and registration form on one page](https://wordpress.org/support/topic/use-of-login-form-and-registration-form-on-one-page/)
 *  [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/use-of-login-form-and-registration-form-on-one-page/#post-17028887)
 * I installed version 2.6.11 from the github repository and it seems to fix the
   issue!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Use of login form and registration form on one page](https://wordpress.org/support/topic/use-of-login-form-and-registration-form-on-one-page/)
 *  [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/use-of-login-form-and-registration-form-on-one-page/#post-17019851)
 * I am having a very similar problem with version 2.6.10
 * [https://wordpress.org/support/topic/version-2-6-10-breaks-registration-form/](https://wordpress.org/support/topic/version-2-6-10-breaks-registration-form/)
 * It would need a restructuring of my whole page if this isn’t possible anymore,
   therefore I hope for a fix.
 * Here is another thread describing also a very similar problem with version 2.6.10:
 * [https://wordpress.org/support/topic/2-shortcodes-showing-the-same-form/](https://wordpress.org/support/topic/2-shortcodes-showing-the-same-form/)
    -  This reply was modified 2 years, 9 months ago by [michaelrich](https://wordpress.org/support/users/michaelrich/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin] Version 2.6.10 breaks registration form](https://wordpress.org/support/topic/version-2-6-10-breaks-registration-form/)
 *  Thread Starter [michaelrich](https://wordpress.org/support/users/michaelrich/)
 * (@michaelrich)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/version-2-6-10-breaks-registration-form/#post-17019843)
 * I added the code to my functions.php and it unfortunately did not change the 
   behavior.

Viewing 14 replies - 1 through 14 (of 14 total)