douwen4178 2017-02-02 11:17
浏览 15

WordPress检查用户是否仅在一段时间后才能登录

Here is picture how my service works

I'm working on page: http://mytengo.com . It's service with ads. When user click +Add new ad, he will be automatically redirected to login page (if he's not logged in). When he log in, He should see New Ad page, But now it's redirecting me once more to Login page (is_user_logged_in = false), and in the login page it redirecting me to Profile page (is_user_logged_in = true).

But when I log in and open this page after 5 minutes it works fine, I can Add new ad. How to solve this problem? I try to change the code a lot of times, so I think the problem is in something else.

global $redux_demo;
$hide_map = $redux_demo['hide-map'];

if ( !is_user_logged_in() ) {
   $login = $redux_demo['login'];
   wp_redirect( $login ); 
   exit;

} else {
}
  • 写回答

1条回答 默认 最新

  • dss524049 2017-02-02 12:55
    关注

    Clear cache, maybe something remained.

    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?