public function getUserDataFromUsername(string $data, string $username)
    {
        return $this->getDriver()->user->get($username, ['by' => 'login'])->{$data};
    }
public function getUserDataFromUsername(string $data, string $username)
    {
        return $this->getDriver()->user->get($username, ['by' => 'login'])->{$data};
    }
public function getUserDataFromUsername ( string $ data , string $ username ) { return $ this -> getDriver ( ) -> user -> get ( $ username , [ 'by' => 'login' ] ) -> { $ data } ; }
Get a piece of user data from their username.

@param string $data     The user data to return (the name of a column from the WP_Users table).
@param string $username The username of the user to fetch a property from.

@return mixed The specified user data.
Get a piece of user data from their username .