Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/plugin/add_facebook_login_button/index.php

19 lines
802 B

<?php
// Show the FACEBOOK login button
$_template['show_message'] = false;
//if (api_is_anonymous() && api_get_setting('facebook_login_activate') == 'true') {
if (api_is_anonymous()) {
require_once api_get_path(SYS_CODE_PATH)."auth/external_login/facebook.init.php";
$_template['show_message'] = true;
// the default title
$button_url = api_get_path(WEB_PLUGIN_PATH)."add_facebook_login_button/img/cnx_fb.png";
$href_link = facebookGetLoginUrl();
if (!empty($plugin_info['settings']['add_facebook_login_button_facebook_button_url'])) {
$button_url = api_htmlentities($plugin_info['settings']['add_facebook_login_button_facebook_button_url']);
}
$_template['facebook_button_url'] = $button_url;
$_template['facebook_href_link'] = $href_link;
}