yuriinalivaiko
Forum Replies Created
-
Hello @shilatayash
Did you follow the steps described in the article How to upload profile photo?
The Profile Photo Upload feature can be enabled or disabled. Go to wp-admin > Ultimate Member > Settings > Appearance > Profile and verify the “Profile Photo Upload” (Disable Profile Photo Upload) setting. This setting should be turned off.
The Profile Photo upload can be enabled/disabled for the certain profile form if you use the form customization settings. Go to wp-admin > Ultimate Member > Forms > Edit Form (Profile) and verify that the “Apply custom settings to this form” setting is set to “No” or the “Disable Profile Photo Upload” is set to “No“.
Regards
Hello @baddon250
The
um_profile_field_filter_hook__{$type}
hook fires after theum_profile_field_filter_hook__{$key}
. That’s why your code is modified by the default functionum_profile_field_filter_hook__phone
.You should change your code to use the
um_profile_field_filter_hook__{$type}
hook or disable default function attached to this hook.Solution 1 – Change your code:
function custom_profile_field_filter_hook__tel( $value, $data ) {
$key = $data['metakey'];
$keys = array(
'mobile_number',
'phone_number',
);
if ( in_array( $key, $keys, true ) ) {
$user_id = um_profile_id();
$value = um_user( $key );
$raw = deformat_phone( $value );
$value = format_phone( $value );
$output = '<a href="tel:' . esc_attr( $raw ) . '" onclick="handle_email_call_notification(' . intval( $user_id ) . ',\'call\');">' . esc_html( $value ) . '</a>';
}
return $output;
}
add_filter( 'um_profile_field_filter_hook__tel', 'custom_profile_field_filter_hook__tel', 100, 2 );Solution 2 – Disable default function:
remove_filter( 'um_profile_field_filter_hook__tel', 'um_profile_field_filter_hook__phone', 99, 2 );
Note: You should always use escaping functions in output.
Regards
This may be because of a plugin conflict. Can you do a conflict test and see if the issue goes away? This doc explains how to do a conflict test: How to do a plugin/theme conflict test? Can post authors access their own posts if the directory plugin is deactivated?
Take a screenshot of the post Content Restriction settings and the post view at frontend if you can not solve a problem.
Regards
Hello @julien-g
Go to wp-admin > Ultimate Member > User Roles > Edit Role to manage the role permissions. Turn on the “Can access wp-admin?” setting to allow users with this role accessing the wp-admin area.
Grant capabilities required to create and edit WordPress posts:
- delete_posts
- delete_published_posts
- edit_posts
- edit_published_posts
- publish_posts
- read
- upload_files
You may need to grant more capabilities to create and edit custom post types. There are no “articles” and “events” in WordPress by default. I guess you use plugins that add a custom post type.
See docs: Administrative Permissions, How to allow member to write posts
Regards
Hello,
Plugins can not restrict direct links. You have to edit the
.htaccess
file to restrict direct links.For example you can add these directives to the
.htaccess
file in theuploads
folder to deny access to PDF files. Only requests with your site in the Referer header will work.SetEnvIf Referer "^https://example\.com/" allowpdfaccess
<FilesMatch ".pdf">
Order Deny,Allow
Deny from all
Allow from env=allowpdfaccess
</FilesMatch>See SetEnvIf, FilesMatch, Allow.
Regards
Hello @valeriemwgmailcom
Verify global access settings and individual content restriction settings for pages. See docs: Common content restriction settings, Individual Post and Term content restriction settings
Note that pages with limited access should be excluded from caching. See Caching problems
Regards
Hello @jomansor
The post author can access the post regardless of the Content Restriction settings for the post.
The content owner who is (um_custom_role_1) should see the post if the post setting “Who can access this post?” is set to “Logged in users” and the “Select which roles can access this post” setting is set to other users role (um_custom_role_2).
Regards
Hello @blackshie
I opened a pull request to fix displaying Telegram and Discord social links in profile header.
Try this code snippet. You’ll see the Discord icon in the profile header, but I’m not sure that a link is correct. Can’t find official documentation about Discord links. Can you direct me to the Discord documentation about using username in links?
/**
* Add Telegram and Discord social links to the profile header.
*/
add_filter( 'um_predefined_fields_hook', function( $predefined_fields ) {
if ( isset( $predefined_fields['telegram'] ) ) {
$predefined_fields['telegram']['advanced'] = 'social';
$predefined_fields['telegram']['color'] = '#24A1DE';
}
if ( isset( $predefined_fields['discord'] ) ) {
$predefined_fields['discord']['advanced'] = 'social';
$predefined_fields['discord']['match'] = 'https://discord.com/users/';
}
return $predefined_fields;
} );Regards
Hello,
Go to wp-admin > Ultimate Member > User Roles > Edit Role and turn on the “Can access wp-admin?” setting in the “Administrative Permissions” section.
See doc User Roles Settings, Grant access to the admin dashboard to a custom role
Regards
Hello,
Use the content restriction settings of the Members page.
- Turn on the “Restrict access to this post?” setting.
- Select “Logged in users” in the “Who can access this post?” setting.
- Select an action you wish in the “What happens when users without access try to view the post?” setting.
See doc Individual Post and Term content restriction settings
—
Verify settings for the user role Author and Keymaster. Turn on the “Can view other member profiles?” to allow these roles to view other member profiles in the directory.
See doc User Roles Settings
Regards
Hello @blackshie
The Discord field value is the Discord user ID number. See How to find a User ID number
The Telegram field value is the Telegram profile link – an URL with the t.me/ domain. See Usernames and t.me
Telegram and Discord social links are not displayed in the profile header by default. Use this code snippet to show the Telegram profile link in the profile header.
/**
* Add Telegram social link to the profile header.
*/
add_filter( 'um_predefined_fields_hook', function( $predefined_fields ) {
if ( isset( $predefined_fields['telegram'] ) ) {
$predefined_fields['telegram']['advanced'] = 'social';
$predefined_fields['telegram']['color'] = '#24A1DE';
}
return $predefined_fields;
} );Regards
Hello @fredperes
Please don’t manipulate the database manually. You can break your website.
You can use “UM Actions” on the Users page to manually approve users or re-send the activation email for them. How to approve the user manually:
- go to wp-admin > Users.
- select needed user(s).
- choose the “Approve Membership” option in the “UM Actions” dropdown above the table.
- click the “Apply” button next to the the “UM Actions” dropdown.
Do the same but choose the “Resend Activation Email” option in the “UM Actions” dropdown if you wish to re-send the activation email.
Regards
Hello @muzahidul03,
Maybe your Login and Registration pages are cached. Disable caching for pages Login, Register, Password Reset, Account, User. The way to disable caching for a certain page depends on the caching plugin or tool you use.
Maybe a PHP error occurs on your site. Enable debug logging, reproduce an error then look at the debug.log file to get error details.
Debug logging is disabled by default. Follow instructions in the article How to enable debug logging to enable the log. Once the debug logging is enabled information about all PHP errors will be collected to the debug.log file in the /wp-content directory. Are there “PHP Fatal error” or “PHP Warning” records in the log?
Regards
Hello @fatalrhymer,
You can add CSS code to the style.css file in the child theme. You can add CSS code to the field “Additional CSS” on wp-admin > Appearance > Customize > Additional CSS if your theme supports this feature.
You also can add CSS code directly to the PHP code snippet. Try this:
add_action( "um_after_login_fields", function() {
?>
<input type="hidden" name="rememberme" value="1">
<style type="text/css">
.um-login .um-field.um-field-c {
display: none !important;
}
</style>
<?php
} );Regards
Hello @jaspash,
The Media Library items are posts (post type
attachment
) with attached files. WordPress usually don’t work with files directly, but works with them through posts. The “Ultimate Member: Content Restriction” tool can restrict access to the media post, so users who don’t have access can’t see and use this media.But this does not influence direct links to the file. The server returns the file called via a direct link immediately, without processing the WordPress code.
Regards