# PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU # General Public License along with Exponent; if # not, write to: # # Free Software Foundation, Inc., # 59 Temple Place, # Suite 330, # Boston, MA 02111-1307 USA # # $Id: profileext_clear.php,v 1.6 2005/04/18 15:33:34 filetreefrog Exp $ ################################################## // Part of the User Management category if (!defined('PATHOS')) { exit(''); } if (pathos_permissions_check('user_management', pathos_core_makeLocation('administrationmodule'))) { if (!defined('SYS_USERS')) { require_once BASE . 'subsystems/users.php'; } pathos_users_includeProfileExtensions(); $existing = $db->selectObject('profileextension', "extension='" . $_GET['ext'] . "'"); if ($existing == null) { call_user_func(array($_GET['ext'], 'clear')); } pathos_flow_redirect(); } else { echo SITE_403_HTML; }
function pathos_users_saveProfileExtensions($formvalues, $user, $is_new) { // Pull in form data for all active profile extensions. // First, we have to clear delete extensions, so that we don't try to include // or use previously active extensions that have been disabled. pathos_users_clearDeletedExtensions(); // Include all class files for active profile extensions. pathos_users_includeProfileExtensions(); // Pull in the database object from the global scope. global $db; // Read in all of the active profile extensions and sort them (which may actually be // unnecessary.) $exts = $db->selectObjects('profileextension'); usort($exts, 'pathos_sorting_byRankAscending'); foreach ($exts as $ext) { // Call the saveProfile method of each profile extension class, which will return the modified user object. $user = call_user_func(array($ext->extension, 'saveProfile'), $formvalues, $user, $is_new); } // Return the full user object to the caller. return $user; }