wordpress-login

How to log a user in to Wordpress using only their user_id

孤人 提交于 2019-12-03 12:13:01
问题 Is there any way I can log a Wordpress user in given only their wp user_ID? I'm sending users emails to confirm something and when they click on the given link to come to the website they need to be logged in to see the page I'm taking them to, so I have to log the user in and then do a header redirect. I need a php function provided by wordpress, one that I can use in php, could you also give me any extra details as to how I can implement it (if any) 回答1: Here a function to auto-log an user

After moving Wordpress, login works, but no admin access anymore

百般思念 提交于 2019-12-03 10:10:30
问题 After transferring a wordpress from an old ISP to a new ISP, I have trouble with the admin access / access to the dashboard. The transfer was done by copying all files (incl. .htaccess) from the old server to the new server, dumping the old DB and putting it on the new server and adjust all settings for DB in wp-config.php. By setting a hosts entry on my machine, I could verify that everything is working fine and all content appears. Here is my problem. After logging in thru wp-login.php with