Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter suricate

    (@suricate)

    I did some research and found a fix.

    file um-actions-profile.php

    Edit line 64:

    old:
    $fields = unserialize( $args['custom_fields'] );

    new:

    $fields = unserialize( $args['custom_fields'] );
    $fields["profile_privacy"] = $args["profile_privacy"];
    $fields["hide_in_members"] = $args["hide_in_members"];

    -> privacy fields are saved into database.

    • This reply was modified 7 years, 7 months ago by suricate.
    Thread Starter suricate

    (@suricate)

    Found another bug…

    method um_remove_special_users_from_list filters user privacy settings. Problem: in line 66 where the query filter is built there’s a hardcoded “Yes”

    			    array(
    					'key' => 'hide_in_members',
    					'value' => 'Yes',
    					'compare' => 'NOT LIKE'
    				)

    When you’re using english as your plugin’s language you’re fine. Else this will fail because the setting is saved translated…

    Fix:
    add another query arg array containing the right value.

    $query_args['meta_query'][] = array(
    				"relation"	=> "OR",
    				array(
    						'key' => 'hide_in_members',
    						'value' => '',
    						'compare' => 'NOT EXISTS'
    			    ),
    			    array(
    					'key' => 'hide_in_members',
    					'value' => 'Ja',
    					'compare' => 'NOT LIKE'
    				)
    			);

    Best solution would be to loop over all found translations and add the right query.

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @suricate,

    You can create pull requests on our GitHub repo.
    https://github.com/ultimatemember/ultimatemember
    Thanks for your contribution.

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Privacy Settings not Updating’ is closed to new replies.