forked from opensource-socialnetwork/ProfAccess
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathossn_com.php
More file actions
33 lines (32 loc) · 858 Bytes
/
ossn_com.php
File metadata and controls
33 lines (32 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Open Source Social Network
*
* @package Open Source Social Network
* @author Open Social Website Core Team <info@informatikon.com>
* @copyright 2014 iNFORMATIKON TECHNOLOGIES
* @license General Public Licence http://www.opensource-socialnetwork.org/licence
* @link http://www.opensource-socialnetwork.org/licence
*/
/**
* Initialize the poke component.
*
* @return void;
* @access private;
*/
function profile_access_init() {
ossn_register_callback('page', 'load:profile', 'profile_access_validate');
}
/**
* Profile Access Validate
*
* @return void;
* @access private;
*/
function profile_access_validate($callback, $type, $params){
if (!ossn_isLoggedin()) {
ossn_trigger_message(ossn_print('profile:access:error'), 'error');
redirect();
}
}
ossn_register_callback('ossn', 'init', 'profile_access_init');