HEX
Server: LiteSpeed
System: Linux server490.bertina.biz 5.14.0-687.31.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Aug 1 05:38:01 EDT 2026 x86_64
User: parskavirpaya (1252)
PHP: 8.1.34
Disabled: mail, show_source, system, shell_exec, passthru, exec, popen
Upload Files
File: /home/parskavirpaya/public_html/wp-content/plugins/wp-parsidate/inc/Helper/User.php
<?php

namespace WPParsidate\Helper;

defined( 'ABSPATH' ) || exit;

class User {
  /**
   * Get user data
   *
   * @param string $field User data field
   * @param int $userID User ID. if not set, get current user logged-in ID
   *
   * @return false|int|mixed|string|\WP_User
   */
  public static function getData( $field = null, $userID = 0 ) {
    if ( $userID === 0 ) {
      $userID = get_current_user_id();
    }

    if ( $userID === 0 ) {
      return false;
    }

    $user = get_userdata( $userID );

    if ( is_null( $field ) ) {
      return $user;
    }

    return $user->$field ?? '';
  }
}