Disable user profile editing for one user

I have being looking in internet how can I disable the option of edit profile in Wordpress for a user and I didn't find a good way. The problem is that I want that the 95% of users can edit their profiles (address, telephone,...) but there is another 5% that I don't want them to have access to the profile section. The best solution for me is to select manually the users that I want to disable but I also …
Category: Web

How to disable profile.php for users?

I am using wordpress 4.2.2 and i am using buddypress latest version. I want all my users customize their profile at buddypress profile page. So i want to disable profile.php for the users. I hide the profile link from dashboard by the WP admin UI customize plugin.But when anyone type url mysite/wp-admin/profile.php it's appear on browser.So i want to escape from the problem and want to disable profile.php for the users. What should i do to do this?
Category: Web

Need help with creating a searchable user data by name or specific number like ID

Thanks for this gift. Here is my issue, i wish to be able to add users profiles to my wordpress company site in which we register the users name and other details as need be. The purpose for this is that we safe files for customers and i want to register all user data accordingly then provide a search form where the users or myself can enter their name or a unique code or id which should display their complete …
Category: Web

How to display comments by logged in user and responses?

I want to create a profile page and display the logged in persons comments. And, also the responses to his/her comment. Like this: Post title Comment (by logged in user) ---> Responses (replies) to his/her comment Any ideas how to do this? EDIT: This is what I got right now. I get the logged in persons' comments with use of a shortcode on a page that I have. What I want to get is also the responses for each comment …
Category: Web

How to read and write session data?

My website requires users to complete their profile before they can place an order. So far, I have been able to redirect a user to his profile editing page if his profile is incompleted when he tries to place an order. add_action('woocommerce_before_checkout_form',function(){ if (is_user_logged_in()){ $user = wp_get_current_user(); if ( bpprocn_has_incomplete_profile($user->id) ) { // check user's profile completed or not if (wp_redirect(bp_core_get_user_domain( $user->id ) . bp_get_profile_slug() . '/edit/group/2')) exit; } } }); Now I am trying to figure out how to …
Category: Web

User profile in front-end

I want every user to get a profile in the front-end of my website. So I want to visit website.com/user/user-name and view all the information of this user. Is this somehow possible? I would like to do this without a plug-in. All things I'll found on Google did include a plug-in like Front-End Only Users..
Category: Web

How to link to the current User/Author Profile page?

Is there a way to link to the authors profile page? At the moment i can access the authors profile by visiting the url like this: http://mysite.com/?author=1 Is there a function that i could use to show this link regardless if the permalinks are changed? Thanks in advanced.
Category: Web

the_author_meta not working

I'm trying to use the_author_meta to retrieve some links which users can set in their profile. I set up extra profile fields and they are saving to the database. On my author.php I have the following code. <div class="user_social_icons"><a href="<?php the_author_meta('facebook'); ?>" class="facebook" title="Facebook"></a></div> For some reason this appears not to be working. Any idea to why that may be? Cheers
Category: Web

How to create a edit profile page for users?

How do I create an Edit Profile page for users on the frontend with custom fields using Wordpress? Example Fields: Image Upload Field Text Field Etc... And how can a user can save these fields? Thanks!
Category: Web

How to create front-end (editable) Wordpress user profile pages?

So I am using Gravity Forms to create registration and login forms. But after the user logs in, I want them to be able to see a custom front-end profile page instead of the default Wordpress user dashboard. This page has to be catered based on the role the user signed up for. I want to refrain from using any plugins (other than Gravity Forms extensions) because this profile page has information that must be integrated with another plugin called …
Category: Web

After logout browser's back button into twenty sixteen theme profile

I have tried numerous ways to prevent the browser's back button from allowing someone from using it to go back into a visitors logged out profile. The codes I used were supposed to prevent the browser from caching data from the last page visited after logout. They don't work. Wordpress logs the visitor out once they click the logged out button, yes this portion wors. Unfortunately, you can see the last page visited by the person who was logged on. …
Category: Web

How to display a public profile page for registered users with custom slug?

I have a website where users can register, login and their edit profile, they can comment but not post. What I am looking for is a way to display a user profile page (where I display the gravatar and the info about the user) clicking on the username. The url must be something like "www.mywebsite.com/user/username". I know about author.php, but I don't know how to link even if the user has no posts and is not an author. UPDATE: I …
Category: Web

WP Use Profile Fields is missing

The entire User Profile Fields link is missing and I cant make new pages. We use Vibe BP and WPLMS systems and every time there is a critical error, WP cites the issue in line 69 in vibe bp code
Category: Web

action user_new_form param is a string

In the action user_new_form, the parameter $user returns a string add-new-user. I've used esc_attr( get_the_author_meta( '_typeuser', $user->ID ) ); but I get an error. Another question on the topic is non-response at the moment but I've patched the problem with: /* PROFIL FIELD */ add_action( 'show_user_profile', 'my_show_extra_profile_fields' ); add_action( 'edit_user_profile', 'my_show_extra_profile_fields' ); add_action( 'user_new_form', 'my_show_extra_profile_fields'); function my_show_extra_profile_fields( $user ) { if(is_string($user) === true){ $user = new stdClass();//create a new $user->ID = -9999; } $newsletter = esc_attr( get_the_author_meta( '_newsletter', $user->ID ) …
Category: Web

How to get profile user id when uploading image via media uploader on profile page

I have a PlugIn which lets a user upload an image to a user profile in the backend. Now I want to access the user id in the uploader to change the filename of the uploaded image. On the user profile edit page, I get the id via global $profileuser. But when I access it in a function I added as a filter to wp_handle_upload, $profileuser is empty. Any ideas how to get the profile user (not the logged in …
Category: Web

How $_GET['updated'] variable is passed when updating a user?

I have added two user metas and they are functioning perfectly. Now I want to show a warning message according to the input. I have passed the status through a get variable(named meta_warning through add_query_arg) and the message is displayed accordingly. But on refreshing the page, the message repeats (since the get variable is passed directly in the url). I have noticed that the wordpress is using a similar variable (updated=1) to show the 'User Updated' message. But this variable …
Category: Web

Generate a QR code when creating a new WordPress user

I know that you can use the show_user_profile, edit_user_profile, personal_options_update and edit_user_profile_update to add and manage additional fields in user profiles. In a site I'm developing, I need to add a new field in user profiles to store a QR code that unambiguously identifies a user when creating it. My question is, is there an easy way to generate a QR code when adding a new user to a WordPress site? If so, how? Do I need any external lib …
Category: Web

How do you update user_email on the front end in WP 3.3?

I am using the following code and everything in the user profile is updating except the user's email. In the template: global $current_user, $wp_roles; get_currentuserinfo(); /* Load the registration file. */ require_once( ABSPATH . WPINC . '/registration.php' ); /* If profile was saved, update profile. */ if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'update-user' ) { /* Update user password. */ if ( !empty($_POST['pass1'] ) && !empty( $_POST['pass2'] ) ) { if ( $_POST['pass1'] == …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.