Simple status box for the sidebar.
[elgg_plugins.git] / openid_client / lib.php
blob594a386d6846a8afa5af65fa779076541bef9cb3
1 <?php
3 function openid_client_init() {
5 global $function;
6 global $CFG;
8 // set search functions
9 $function['display:sidebar'][] = $CFG->dirroot . "mod/openid_client/function_log_on_pane.php";
13 function openid_client_pagesetup() {
14 global $CFG;
15 global $PAGE;
17 // Redirect profile links
18 if (defined("context") && context == "profile") {
19 $page_owner = page_owner();
20 if (user_info("user_type",$page_owner) == "external") {
21 $alias = user_info("alias",$page_owner);
22 if (!empty($alias)) {
23 header("Location: {$alias}");
24 exit;
29 // set up admin page
31 if (defined("context") && context == "admin") {
32 $PAGE->menu_sub[] = array ( 'name' => 'openid_client:admin',
33 'html' => "<a href=\"{$CFG->wwwroot}/mod/openid_client/admin.php\">"
34 . gettext("Configure OpenID client") . '</a>');