Simple status box for the sidebar.
[elgg_plugins.git] / forwarder / landing.php
blob8c33dd465e3dc4afe900b638f56c5fa1c334029a
1 <?php
3 require("../../includes.php");
5 global $page_owner;
6 global $CFG;
7 global $messages;
9 $profile_name = optional_param('profile_name', '-1', PARAM_ALPHANUM);
10 if (!empty($profile_name)) {
11 $page_owner = user_info_username('ident',$profile_name);
13 if (empty($page_owner)) {
14 $page_owner = optional_param('profile_id', $page_owner, PARAM_INT);
17 $username = user_info("username",$page_owner);
18 $forwarder = user_flag_get('forwarder', $page_owner);
20 $_SESSION['messages'] = $messages;
22 if ($forwarder) {
23 header("Location: ".$CFG->wwwroot . $username . "/" . $forwarder . "/");
24 } elseif ($username) {
25 header("Location: ".$CFG->wwwroot . $username . "/profile/");
26 } else {
27 header("Location: ".$CFG->wwwroot);