user_id = get_current_user_id(); if ( current_user_can( 'administrator' ) || self::always_allow_edit() ) { $can_update = true; } elseif ( $profile_user_id && $current_user_id && $profile_user_id === $current_user_id ) { $can_update = true; } elseif( self::current_user_can_create_users( $register_action ) ) { $can_update = true; } elseif( $profile_user_id && is_object( $form ) && ! empty( $form->options['open_editable_role'] ) && FrmProFieldsHelper::user_has_permission( $form->options['open_editable_role'] ) ) { $can_update = true; } return $can_update; } /** * Check for situations where editing should be allowed * * @since 2.02.01 * * @return bool */ private static function always_allow_edit() { $force_edit = defined( 'FRM_ALLOW_EDIT' ) && FRM_ALLOW_EDIT; if ( is_callable( 'wp_doing_cron' ) ) { $is_cron = wp_doing_cron(); // added in WP 4.8 } else { $is_cron = defined( 'DOING_CRON' ) && DOING_CRON; } $allowed = $force_edit || $is_cron || self::is_import(); return apply_filters( 'frmreg_allow_edit', $allowed ); } /** * Check if import is occurring * * @since 2.02.01 * * @return bool */ public static function is_import() { return defined( 'WP_IMPORTING' ) && WP_IMPORTING; } public static function username_exists($username){ $username = sanitize_user($username, true); if(!function_exists('username_exists')) require_once(ABSPATH . WPINC . '/registration.php'); return username_exists( $username ); } public static function add_tooltip( $name, $class = 'closed' ) { $tooltips = array( 'mod_email' => __('Require new users to confirm their e-mail address before they may log in.', 'frmreg'), 'mod_admin' => __('Require new users to be approved by an administrator before they may log in.', 'frmreg'), 'mod_redirect' => __('Select the page where users will be redirected after clicking the activation link.', 'frmreg'), 'create_subsite'=> __('Create a new subdomain or subdirectory when a user registers with this form.', 'frmreg'), ); if ( !isset($tooltips[$name]) ) { return; } if ( 'open' == $class ) { echo ' frm_help"'; } else { echo ' class="frm_help"'; } echo ' title="'. esc_attr($tooltips[$name]); if ( 'open' != $class ) { echo '"'; } } /** * Gets request method from $_SERVER. * * @since 2.05 * * @return string */ public static function request_method() { return FrmAppHelper::get_server_value( 'REQUEST_METHOD' ); } /** * Returns the URL for a page, of its translate if available. * * @since 2.09 * * @param int $page_id The page id. * * @return string The page URL. */ public static function get_page_url( $page_id ) { if ( function_exists( 'pll_current_language' ) ) { $pll_current_language = pll_current_language(); if ( $pll_current_language !== pll_get_post_language( $page_id ) ) { $page_id = pll_get_post( $page_id, $pll_current_language ); } } return get_permalink( $page_id ); } /*----------------Deprecated Functions--------------------*/ /** * @deprecated 2.0 */ public static function global_login_page_id() { _deprecated_function( __FUNCTION__, '2.0', 'FrmRegLoginController::login_page_id' ); return FrmRegLoginController::login_page_id(); } /** * @deprecated 2.0 */ public static function get_login_url( $params ) { _deprecated_function( __FUNCTION__, '2.0', 'FrmRegLoginController::login_page_url' ); $login_url = FrmRegLoginController::login_page_url( 'wordpress' ); $login_url = add_query_arg( $params, $login_url ); return $login_url; } /** * @deprecated 2.0 */ public static function maybe_activate_user() { _deprecated_function( __FUNCTION__, '2.0', 'custom code' ); } /** * @deprecated 2.0 */ public static function create_ajax_url( $params ) { _deprecated_function( __FUNCTION__, '2.0', 'FrmRegModerationController::create_ajax_url' ); return FrmRegModerationController::create_ajax_url( $params ); } /** * @deprecated 2.0 */ public static function validate_activation_link() { _deprecated_function( __FUNCTION__, '2.0', 'custom code' ); } /** * @deprecated 2.0 */ public static function get_default_options(){ _deprecated_function( __FUNCTION__, '2.0', 'FrmRegActionHelper::get_default_options' ); return FrmRegActionHelper::get_default_options(); } /** * @deprecated 2.0 */ public static function is_below_2() { _deprecated_function( __FUNCTION__, '2.0', 'FrmRegAppHelper::is_formidable_compatible' ); return ! FrmRegAppHelper::is_formidable_compatible(); } /** * @deprecated 2.0 - Private FrmRegLoginForm::add_login_messages function replaces this */ public static function print_messages() { _deprecated_function( __FUNCTION__, '2.0', 'FrmRegLoginForm::get_html' ); } /** * @deprecated 2.0 - Private FrmRegLoginForm::get_redirect_to function replaces this */ public static function get_redirect_to() { _deprecated_function( __FUNCTION__, '2.0', 'FrmRegLoginForm::get_html' ); return ''; } /** * @deprecated 2.0 - Private FrmRegUser::generate_unique_username function replaces this */ public static function generate_unique_username(){ _deprecated_function( __FUNCTION__, '2.0', 'custom code' ); return ''; } /** * @deprecated 2.0 - Private FrmRegEntry::get_user_for_entry function replaces this */ public static function get_user_for_entry() { _deprecated_function( __FUNCTION__, '2.0', 'custom code' ); return 0; } /** * @deprecated 2.0 - Private FrmRegModerationController::get_registration_settings_for_user function replaces this */ public static function get_form_settings() { _deprecated_function( __FUNCTION__, '2.0', 'custom code' ); return array(); } /** * @deprecated 2.0 - Private FrmRegModerationController::get_entry_for_user function replaces this */ public static function get_entry_for_user() { _deprecated_function( __FUNCTION__, '2.0', 'custom code' ); return false; } /** * @deprecated 2.0 - Private FrmRegModerationController::get_form_for_user function replaces this */ public static function get_form_from_entry() { return false; } /** * @deprecated 2.0 - FrmRegActionHelper::get_registration_settings_for_form() replaces this * * @param object|int $form * @return array */ public static function get_registration_settings( $form ) { _deprecated_function( __FUNCTION__, '2.0', 'FrmRegActionHelper::get_registration_settings_for_form' ); return FrmRegActionHelper::get_registration_settings_for_form( $form ); } }
Fatal error: Uncaught Error: Class "FrmRegAppHelper" not found in /htdocs/wp-content/plugins/formidable-registration/controllers/FrmRegHooksController.php:7 Stack trace: #0 /htdocs/wp-includes/class-wp-hook.php(310): FrmRegHooksController::load_hooks('') #1 /htdocs/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #2 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /htdocs/wp-settings.php(495): do_action('plugins_loaded') #4 /htdocs/wp-config.php(96): require_once('/htdocs/wp-sett...') #5 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #6 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #7 /htdocs/index.php(17): require('/htdocs/wp-blog...') #8 {main} thrown in /htdocs/wp-content/plugins/formidable-registration/controllers/FrmRegHooksController.php on line 7