Answers for "wordpress global current_user"

PHP
4

wordpress get username

$current_user = wp_get_current_user();
echo($current_user->user_login);
Posted by: Guest on January-29-2021
-1

logout all the users from site wordpress

Generate new salt and key for wordpress and replace with the old one which will
forcefully logout all the logged in users.
https://api.wordpress.org/secret-key/1.1/salt/

https://www.greengeeks.in/tutorials/article/completely-force-logout-users-wordpress/#:~:text=Using%20the%20WPForce%20Logout%20Plugin&text=Then%20in%20the%20%E2%80%9CBulk%20Actions,%E2%80%9CLogout%20All%20Users%E2%80%9D%20button.
Posted by: Guest on March-31-2021

Browse Popular Code Answers by Language