
How to get admin user ID
Share This Post How to get admin User ID? It’s been really difficult for many to get back the admin user ID but it’s so
It’s been really difficult for many to get back the admin user ID but it’s so simple because this code snippet will help to get it to the way you are waiting for.
Let’s check how it is working…
/**
* Return admin user id
*
* @return int
*/
public function get_admin_user_id() {
$admin_email = get_option('admin_email');
$admin_user = get_user_by( 'email', $admin_email );
return $admin_user->ID;
}
So, All you need to add this code snippet to your theme functions.php file to know admin user ID easily. Enjoy!
Share This Post How to get admin User ID? It’s been really difficult for many to get back the admin user ID but it’s so
Share This Post Award GamiPress on RCPro Membership Renewal Do you think users can also be awarded points/badges/ranks while RCPro Membership renewal? Yes, you can
Share This Post Custom Message with myCRED Transfer MyCred assigns different points to the users but it’s been sometime noticed that the users want to
Once you send the details, we will be shortly back to you. Thanks!
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.