Index: configs/service-dependencies.config.php =================================================================== diff -u -r39486fcb8e64fad802155311fb18d00439b249d7 -r0e5b0e86c49f489d784c19094993eb00a72601ab --- configs/service-dependencies.config.php (.../service-dependencies.config.php) (revision 39486fcb8e64fad802155311fb18d00439b249d7) +++ configs/service-dependencies.config.php (.../service-dependencies.config.php) (revision 0e5b0e86c49f489d784c19094993eb00a72601ab) @@ -11,7 +11,7 @@ 'Authenticator' => ['Api', 'Session', 'PasswordValidator', 'Rest', 'Inflector'], 'LoginController' => [ 'Authenticator', 'Config', 'Captcha', 'FormData', - 'Redirect', 'FlashMessenger', 'UrlHelper', 'Profile', + 'Redirect', 'FlashMessenger', 'UrlHelper', 'Profile','Curl' ], 'Lemans\Auth\PasswordValidator\Standard' => ['MapReduce'], ) Index: src/Lemans/Auth/Controller/Login.php =================================================================== diff -u -r573804d6fe0e793ed0cafdc8481a8f8d3bfd6834 -r0e5b0e86c49f489d784c19094993eb00a72601ab --- src/Lemans/Auth/Controller/Login.php (.../Login.php) (revision 573804d6fe0e793ed0cafdc8481a8f8d3bfd6834) +++ src/Lemans/Auth/Controller/Login.php (.../Login.php) (revision 0e5b0e86c49f489d784c19094993eb00a72601ab) @@ -88,6 +88,8 @@ */ private $profile = null; + private $curl = null; + /** * Set the authenticator * @@ -178,6 +180,13 @@ $this->profile = $profile; } + // private $curl = null; + + public function setCurl($curl) + { + $this->curl = $curl; + } + /** * Show the login page */ @@ -186,7 +195,32 @@ if($this->auth->isLoggedIn()) { $this->redirect->redirect("/"); } else { - $this->load->layout('login/index'); + var_dump("JJOHN TEST"); + var_dump($_SERVER['WP_URL']); + + $view = $this->create('ViewModel'); + $this->curl->create($_SERVER['WP_URL']. '/wp-json/wp/v2/pages?slug=landing-image'); + + $page = $this->curl->execute(); + var_dump($page); + if($page == false) + { + $this->logger->log('debug', "Curl Error String: " . $this->curl->error_string . "Curl Error Code: ". $this->curl->error_code); + + $view->exception = $this->curl->error_string; + $this->load->layout('errors/html/error_404', $view); + return; + } + else + { + echo "
";
+                    var_dump(json_decode($page));
+                    echo "
"; + $view->page = json_decode($page)[0]; + } + + + $this->load->layout('login/index', $view); } } @@ -335,4 +369,4 @@ return count($errors) == 0; } -} +} \ No newline at end of file Index: views/login/index.php =================================================================== diff -u -r8d6f5a251303eb4dd71889e3c913c33ffe59d8d1 -r0e5b0e86c49f489d784c19094993eb00a72601ab --- views/login/index.php (.../index.php) (revision 8d6f5a251303eb4dd71889e3c913c33ffe59d8d1) +++ views/login/index.php (.../index.php) (revision 0e5b0e86c49f489d784c19094993eb00a72601ab) @@ -1,5 +1,23 @@ pageStyle('loginpage')?> +acf->landing_image->url) ? substr($page->acf->landing_image->url,strpos($page->acf->landing_image->url,'/wp-content/')) : ''; +?> + +

Rider Support Login