Files
WrenchBoradWeb/www/application/controllers/Home.php
T
2022-04-03 14:10:01 -04:00

48 lines
1.1 KiB
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//Include Hybridauth autoloader
require APPPATH . '/third_party/hybridauth/autoload.php';
//Import Hybridauth's namespace
use Hybridauth\Hybridauth;
class Home extends WRB_Controller {
function __construct()
{
parent::__construct();
//Load URL helper
$this->load->helper('url');
//Load session library
$this->load->library('session');
}
//Displays social login links
public function index() {
// Load Hybridauth's helper
$this->load->helper('hybridauth');
// Instantiate Hybridauth's classes
$hybrid = new Hybridauth(get_hybridauth_config());
// Get login links
$login_links = get_hybridauth_links($hybrid, $this->router);
// Pass login links to html template
$data['login_links'] = $login_links;
// Render html template
$this->load->view('site3/external/view_home', $data);
}
public function about() {
$this->home2('home2/about');
}
}