✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.101
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/public_html/wp-content/plugins/user-meta/models//MethodsModel.php
<?php
namespace UserMeta;

class MethodsModel
{

    function userUpdateRegisterProcess($actionType, $formName, $rolesForms = null)
    {
        global $userMeta;

        $userMeta->enqueueScripts(array(
            'user-meta',
            'jquery-ui-all',
            'fileuploader',
            'wysiwyg',
            'jquery-ui-datepicker',
            'jquery-ui-slider',
            'timepicker',
            'validationEngine',
            'password_strength',
            'placeholder',
            'multiple-select'
        ));
        $userMeta->runLocalization();

        $actionType = strtolower($actionType);

        if (empty($actionType))
            return $userMeta->showError(__('Please provide a name of action type.', $userMeta->name));

        if (! $userMeta->validActionType($actionType))
            return $userMeta->showError(sprintf(__('Sorry. type="%s" is not valid.', $userMeta->name), $actionType));

        /*
         * if ( ! $userMeta->isPro() ) {
         * if ( ! in_array( $actionType, array('profile','public') ) )
         * return $userMeta->showError( "type='$actionType' is only supported, in pro version. Get " . $userMeta->getProLink( 'User Meta Pro' ), "info", false );
         * }
         */

        $user = wp_get_current_user();
        $userID = (isset($user->ID) ? (int) $user->ID : 0);
        $isLoggedIn = ! empty($userID);

        if ($actionType == 'profile-registration')
            $actionType = $isLoggedIn ? 'profile' : 'registration';

        // Checking Permission
        if ($actionType == 'profile') {
            if (! $isLoggedIn) {
                $msg = $userMeta->getMsg('profile_required_loggedin');
                return empty($msg) ? null : $userMeta->showMessage($msg, 'info');
            }

            if (! empty($_REQUEST['user_id'])) {
                if ($userID != esc_attr($_REQUEST['user_id'])) {
                    if ($user->has_cap('add_users')) {
                        $userID = esc_attr($_REQUEST['user_id']);
                        $user = get_user_by('id', $userID);
                        if (empty($user))
                            return $userMeta->showError(__('No user found!.', $userMeta->name));
                    } else
                        return $userMeta->showError(__("You do not have permission to access user profile.", $userMeta->name));
                }

                /*
                 * if( $user->has_cap( 'add_users' ) ){
                 * $userID = esc_attr( $_REQUEST['user_id'] );
                 * $user = get_user_by('id', $userID);
                 * if( empty($user) )
                 * return $userMeta->showError( __( 'No user found!.', $userMeta->name ) );
                 * }else
                 * return $userMeta->showError( __( "You do not have permission to access user profile.", $userMeta->name ) );
                 */
            }
        } elseif ($actionType == 'registration') {
            if ($isLoggedIn && ! $user->has_cap('add_users'))
                return $userMeta->showMessage(sprintf(__('You have already registered. See your <a href="%s">profile</a>', $userMeta->name), $userMeta->getProfileLink()), 'info');
            elseif (! apply_filters('user_meta_allow_registration', true))
                return $userMeta->showError(__('User registration is currently not allowed.', $userMeta->name));
            // elseif ( ! get_option( 'users_can_register' ) )
        } elseif ($actionType == 'public') {
            if (!current_user_can('edit_users') && !$userMeta->isPro()) {
                return $userMeta->showError(esc_html__('You do not have permission to view this user profile!', $userMeta->name));
            }
            if (! empty($_REQUEST['user_id'])) {
                $userID = esc_attr($_REQUEST['user_id']);
                $user = get_user_by('id', $userID);
                if (empty($user))
                    return $userMeta->showError(__('No user found!.', $userMeta->name));
            } else {
                if (! $isLoggedIn) {
                    $msg = $userMeta->getMsg('public_non_lggedin_msg');
                    return empty($msg) ? null : $userMeta->showMessage($msg, 'info');
                }
            }
        }

        if (! empty($rolesForms)) {
            if (is_string($rolesForms))
                $rolesForms = $userMeta->toArray($rolesForms);
            if ($userID && in_array($actionType, array(
                'profile',
                'public'
            ))) {
                $role = $userMeta->getUserRole($userID);
                if (isset($rolesForms[$role])) {
                    $formName = $rolesForms[$role];
                }
            }
        }

        if (empty($formName))
            return $userMeta->showError(__('Please provide a form name.', $userMeta->name));

        $formBuilder = new FormGenerate($formName, $actionType, $userID);

        if (! $formBuilder->isFound())
            return $userMeta->ShowError(sprintf(__('Form "%s" is not found.', $userMeta->name), $formName));

        // $savedValues = in_array( $actionType, array('profile','public') ) ? get_userdata( $userID ) : null;

        $form = $formBuilder->getForm();

        // $userMeta->dump($form);

        /*
         * $form = $userMeta->getFormData( $formName );
         * if ( is_wp_error( $form ) )
         * return $userMeta->ShowError( $form );
         */

        $form['form_class'] = ! empty($form['form_class']) ? $form['form_class'] : '';
        $form['form_class'] = 'um_user_form ' . $form['form_class'];
        if (empty($form['disable_ajax']))
            $form['onsubmit'] = "umInsertUser(this);";

        $output = $userMeta->render('generateForm', array(
            'form' => $form,
            // 'fieldValues' => in_array( $actionType, array('profile','public') ) ? get_userdata( $userID ) : null,
            'actionType' => $actionType,
            'userID' => $userID,
            'methodName' => 'InsertUser'
        ));

        return $output;
    }

    function userLoginProcess($formName = null)
    {
        global $userMeta;

        if (! empty($formName)) {
            $userMeta->enqueueScripts(array(
                'user-meta',
                'jquery-ui-all',
                'fileuploader',
                'wysiwyg',
                'jquery-ui-datepicker',
                'jquery-ui-slider',
                'timepicker',
                'validationEngine',
                'password_strength',
                'placeholder',
                'multiple-select'
            ));
        } else {
            $userMeta->enqueueScripts(array(
                'user-meta',
                'placeholder'
            ));
        }
        $userMeta->runLocalization();
        removeDisabledHooks();

        return (new Login())->loginForm($formName);
    }
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
22 Jun 2026 6.38 AM
tdhomesa / tdhomesa
0755
classes
--
9 Apr 2024 10.01 AM
tdhomesa / tdhomesa
0755
AjaxModel.php
8.611 KB
12 Jan 2025 7.50 PM
tdhomesa / tdhomesa
0644
InitPluginModel.php
3.984 KB
12 Jan 2025 7.50 PM
tdhomesa / tdhomesa
0644
MethodsModel.php
6.691 KB
12 Jan 2025 7.50 PM
tdhomesa / tdhomesa
0644
SupportArrayModel.php
36.508 KB
12 Jan 2025 7.50 PM
tdhomesa / tdhomesa
0644
SupportHtmlModel.php
8.477 KB
12 Jan 2025 7.50 PM
tdhomesa / tdhomesa
0644
SupportModel.php
18.369 KB
12 Jan 2025 7.50 PM
tdhomesa / tdhomesa
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF