root/devel/mod/profile/lib/function_init.php

Revision 1301, 1.3 kB (checked in by dramirez, 1 year ago)

Moved from units to mod:

  • profile
  • users
  • template

Updated .htaccess rules

  • Property svn:eol-style set to native
Line 
1 <?php
2
3     // ELGG profile system initialisation
4     
5     // ID of profile to view / edit
6
7         global $profile_id;
8         global $page_owner;
9         
10         if ($profile_name = optional_param('profile_name')) {
11             if ($profile_id = user_info_username('ident', $profile_name)) {
12                 $page_owner = $profile_id;
13             }
14         }
15         
16         if (empty($profile_id)) {
17             $profile_id = optional_param("profile_id",optional_param("profileid",$_SESSION['userid'],PARAM_INT),PARAM_INT);
18         }
19
20         /*
21         
22         if (isset($_REQUEST['profile_name'])) {
23             $profile_id = (int) user_info_username('ident', $_REQUEST['profile_name']);
24         } else if (isset($_REQUEST['profile_id'])) {
25             $profile_id = (int) $_REQUEST['profile_id'];
26         } else if (isset($_POST['profileid'])) {
27             $profile_id = (int) $_POST['profileid'];
28         } else if (isset($_SESSION['userid'])) {
29             $profile_id = (int) $_SESSION['userid'];
30         } else {
31             $profile_id = -1;
32         }
33         */
34
35         
36         if (!isset($page_owner) || optional_param("profile_id",-9000,PARAM_INT) != -9000) {
37             $page_owner = $profile_id;
38         }
39         
40         if (!defined('profileinit')) {
41             define('profileinit', true);
42         }
43
44 ?>
Note: See TracBrowser for help on using the browser.