示例#1
0
 function event_com_community_profile_removeavatar()
 {
     return XiptLibAvatar::removeProfilePicture();
 }
示例#2
0
 function onAjaxCall(&$func, &$args, &$response)
 {
     $callArray = explode(',', $func);
     //perform Access checks
     $ajax = true;
     XiptAclHelper::performACLCheck($ajax, $callArray, $args);
     // If we come here means ACL Check was passed
     $controller = $callArray[0];
     $function = $callArray[1];
     switch ($controller . '_' . $function) {
         //before creating new account, validate email and username
         case 'connect_ajaxCreateNewAccount':
             return XiptHelperRegistration::ajaxCreateNewAccountFacebook($args, $response);
         case 'connect_ajaxCheckEmail':
             return XiptHelperRegistration::ajaxCheckEmailDuringFacebook($args, $response);
         case 'connect_ajaxCheckUsername':
             return XiptHelperRegistration::ajaxCheckUsernameDuringFacebook($args, $response);
         case 'connect_ajaxShowNewUserForm':
             return XiptHelperRegistration::ajaxShowNewUserForm($args, $response);
         case 'connect_ajaxUpdate':
             return XiptHelperRegistration::ajaxUpdate($args, $response);
             // when controller == register
         // when controller == register
         case 'register_ajaxCheckEmail':
         case 'register_ajaxCheckUserName':
             return XiptHelperRegistration::$function($args, $response);
             //when controller == apps
         //when controller == apps
         case 'apps_ajaxAddApp':
         case 'apps_ajaxAdd':
             $my = JFactory::getUser();
             //XITODO : Remove it and add assert
             if (0 == $my->id) {
                 return true;
             }
             $profiletype = XiptLibProfiletypes::getUserData($my->id, 'PROFILETYPE');
             return XiptLibApps::filterAjaxAddApps($args[0], $profiletype, $response);
         case 'profile_ajaxConfirmRemoveAvatar':
             //case 'profile_ajaxConfirmRemovePicture':
         //case 'profile_ajaxConfirmRemovePicture':
         case 'profile_ajaxRemovePicture':
             // This case use for Admin panel
             return XiptLibAvatar::removeAvatar($args, $response);
         default:
             // 	we do not want to interfere, go ahead JomSocial
             return true;
     }
 }