コード例 #1
0
function exponent_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.
    exponent_users_clearDeletedExtensions();
    // Include all class files for active profile extensions.
    exponent_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, 'exponent_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;
}
コード例 #2
0
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
// Part of the User Management category
if (!defined('EXPONENT')) {
    exit('');
}
if (exponent_permissions_check('user_management', exponent_core_makeLocation('AdministrationModule'))) {
    if (!defined('SYS_USERS')) {
        require_once BASE . 'subsystems/users.php';
    }
    exponent_users_includeProfileExtensions();
    exponent_flow_set(SYS_FLOW_PROTECTED, SYS_FLOW_ACTION);
    $template = new template('AdministrationModule', '_profileextManager', $loc);
    exponent_users_clearDeletedExtensions();
    // This will clear db of deleted exts.
    $exts = $db->selectObjects('profileextension');
    if (!defined('SYS_SORTING')) {
        require_once BASE . 'subsystems/sorting.php';
    }
    usort($exts, 'exponent_sorting_byRankAscending');
    for ($i = 0; $i < count($exts); $i++) {
        $exts[$i]->name = call_user_func(array($exts[$i]->extension, 'name'));
        $exts[$i]->author = call_user_func(array($exts[$i]->extension, 'author'));
        $exts[$i]->description = call_user_func(array($exts[$i]->extension, 'description'));
    }
    $unused = exponent_users_listUnusedExtensions();
    foreach ($unused as $i) {
        $unused[$i] = null;
        $unused[$i]->name = call_user_func(array($i, 'name'));