Skip to content

Commit

Permalink
Profile Access Intital Release
Browse files Browse the repository at this point in the history
  • Loading branch information
lianglee committed Dec 17, 2014
1 parent dede74d commit ebfd30c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions ossn_com.php
@@ -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');

0 comments on commit ebfd30c

Please sign in to comment.