how to make dynamic subdomain for each user registering?
You can achieve this using WordPress Multisite (Network) feature. Please follow this tutorial for more details. Hope this will helps you
You can achieve this using WordPress Multisite (Network) feature. Please follow this tutorial for more details. Hope this will helps you
The function you are looking for is wpmu_delete_user($user->ID) I wrote a small plugin to delete users across the whole network by role: <?php /** * Plugin Name: Regbox Delete multisite users * Plugin URI: http://www.regbox.se/delete-multisite-users * Description: Delete users by role across network * Version: 0.1 * Author: Adam Rehal * Author URI: http://www.regbox.se * … Read more
From what I understand you are trying to change the permalink structure of the user, so instead of showing yoursite.com/author/yourusername it will show yoursite/profile/yourusername? You can add a rewrite rule to the permalink structure to make that change: function yourdomain_user_rewrite() { global $wp_rewrite; $wp_rewrite->author_base=”profile”; $wp_rewrite->author_structure=”https://wordpress.stackexchange.com/” . $wp_rewrite->author_base . ‘/%author%’; } add_action( ‘init’, ‘yourdomain_user_rewrite’ ); Then … Read more
Those first 2 actions you linked to from the codex, user_register and profile_update should be exactly what you need. user_register runs right after a user has successfully registered and gives you access to their $user_id which you can use to retrieve any user data you need, like name, email, etc. add_action( ‘user_register’, ‘wse_custom_register_action’, 10, 1 … Read more
If the stdClass objects are all identical in structure, I suggest to create a specific table for them and use a reference to connect to the related user. You can use a serialized user meta to connect a user to more than one record on that table, or use a specific table’s column as “user_id” … Read more
You can use anyone plugin from below: 1) Strong Password Generator 2) Force Strong Passwords 3) Minimum Password Strength Hope this will helps you.
The following will add a “View author profile” link to the row actions (i.e., the links that appear when you hover over the username): add_filter (‘user_row_actions’, ‘add_view_author_page’, 10, 2) ; function add_view_author_page ($actions, $user) { $href = esc_attr (get_author_posts_url ($user->ID)) ; $actions[‘add_view_author_page’] = “<a href=”https://wordpress.stackexchange.com/questions/259665/$href”>View author page</a>” ; return ($actions) ; } Edit: Or if … Read more
If by “made an entry” you mean “has published at least 1 post”, then following will do it (with the proviso given below): $args = array ( ‘role’ => ‘spectator’, ) ; $spectators = new WP_User_Query ($args) ; $users_with_recent_posts = array () ; foreach ($spectators->get_results () as $user) { $args = array ( // if … Read more
Try it: INSERT INTO `wp_usermeta` VALUES (NULL, ‘1’, ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;s:1:”1″;}’); INSERT INTO `wp_usermeta` VALUES (NULL, ‘1’, ‘wp_user_level’, ’10’);
You haven’t posted any code so I won’t be able to precisely post an answer for you, but this it what you can do. Find the page that is rendering the profiles, open it and add this piece of code in it: <?php $user_info = get_userdata($id); $role = $user_info->roles; if ($role ==’corporates’ && !is_user_logged_in()) { … Read more