User register hook can’t access form request

There are a number of issues with the user of update_user_meta() in your function.

First, you should never write the value directly from $_POST without sanitizing it first. That’s a good way to open yourself up to exploits. (Note: you didn’t indicate the field types, so I’m going to assume they are text input – you’ll need to adjust accordingly.)

Next, the last argument of update_user_meta() (where you have “true” in the first one, and “false” in the second), is for the previous value to compare. You’re registering a new user so these fields would not have an existing value. Leave this argument out.

The last field you’re inputting is problematic. As written, you’re using the input value as the field meta key. If it’s a text field, that means the meta key could be anything the user enters. The meta key should be static and probably match up with the field name in some way (like the previous fields).

Lastly, user_register only passes the $user_id argument. Not sure where you got $password and $meta from, but these are not valid arguments for the hook.

Here’s a blind attempt at correcting these issues:

add_action('user_register', 'register_extra_fields');
function register_extra_fields ( $user_id ) {
    update_user_meta( $user_id, 'vardas', sanitize_text_field( $_POST['user_register_vardas'] ) );
    update_user_meta( $user_id, 'pavarde', sanitize_text_field( $_POST['user_register_pavarde'] ) );
    update_user_meta( $user_id, 'telefonas', sanitize_text_field( $_POST['user_register_vardas'] ) );
    update_user_meta( $user_id, 'user_register_vardas', sanitize_text_field( $_POST['user_register_vardas'] ) );
}