Esempio n. 1
0
 public static function verify_state()
 {
     $request_state = ClefUtils::isset_GET('state') ? ClefUtils::isset_GET('state') : ClefUtils::isset_POST('state');
     $correct_state = ClefUtils::get_state();
     if ($request_state && $correct_state && $correct_state == $request_state) {
         ClefUtils::initialize_state(true);
         return true;
     } else {
         throw new ClefStateException('The state parameter is not verified. This may be due to this page being cached by another WordPress plugin. Please refresh your page and try again');
     }
 }
 public function initialize_state_on_login_page()
 {
     if (in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))) {
         ClefUtils::initialize_state();
     }
 }
 public function initialize_state()
 {
     ClefUtils::initialize_state();
 }
 public static function verify_state()
 {
     $request_state = ClefUtils::isset_GET('state') ? ClefUtils::isset_GET('state') : ClefUtils::isset_POST('state');
     $correct_state = ClefUtils::get_state();
     if ($request_state && $correct_state && $correct_state == $request_state) {
         ClefUtils::initialize_state(true);
         return true;
     } else {
         throw new ClefStateException('The state parameter is not verified. This may be due to this page being cached by another WordPress plugin. Please refresh your page and try again. If the issue persists, please follow <a href="http://support.getclef.com/article/95-the-state-parameter-is-not-verified-error#caching" target="_blank">this guide</a> to debug the issue.');
     }
 }