本文整理汇总了PHP中Social::includeOpenidLib方法的典型用法代码示例。如果您正苦于以下问题:PHP Social::includeOpenidLib方法的具体用法?PHP Social::includeOpenidLib怎么用?PHP Social::includeOpenidLib使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Social
的用法示例。
在下文中一共展示了Social::includeOpenidLib方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
<?php
if (!defined('IN_FORMA')) {
die('You can\'t access!');
}
/* ======================================================================== \
| FORMA - The E-Learning Suite |
| |
| Copyright (c) 2013 (Forma) |
| http://www.formalms.org |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
| |
\ ======================================================================== */
$social = new Social();
$social->includeOpenidLib();
try {
if (!isset($_GET['openid_mode'])) {
$openid = new LightOpenID();
$openid->identity = 'https://www.google.com/accounts/o8/id';
$openid->required = array('contact/email', 'namePerson/first', 'namePerson/last');
header('Location: ' . str_replace('&', '&', $openid->authUrl()));
} elseif ($_GET['openid_mode'] == 'cancel') {
Util::jump_to('index.php?access_fail=3');
} else {
$openid = new LightOpenID();
$_GET['openid_return_to'] = $_REQUEST['openid_return_to'];
// to avoid having & instead of &
if ($openid->validate()) {
$user_data = $social->getGoogleUserInfo();
if (!empty($user_data['email'])) {
if (Docebo::user()->isAnonymous()) {