root/releases/0.1.2a/units/profile/function_init.php

Revision 2, 0.6 kB (checked in by sven, 3 years ago)

importing elgg-0.1.1a

Line 
1 <?php
2
3     // ELGG profile system initialisation
4     
5     // ID of profile to view / edit
6
7         global $profile_id;
8     
9         if (isset($_GET['profile_name'])) {
10             $profile_id = (int) run("users:name_to_id", $_GET['profile_name']);
11         } else if (isset($_GET['profile_id'])) {
12             $profile_id = (int) $_GET['profile_id'];
13         } else if (isset($_POST['profile_id'])) {
14             $profile_id = (int) $_POST['profileid'];
15         } else if (isset($_SESSION['userid'])) {
16             $profile_id = (int) $_SESSION['userid'];
17         } else {
18             $profile_id = -1;
19         }
20
21         global $page_owner;
22         
23         $page_owner = $profile_id;
24
25 ?>
Note: See TracBrowser for help on using the browser.