Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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'); |