Retrieve New user’s ID

The only argument you get on user_register is the user ID.

add_action( 'user_register', function( $user_id ) 
{
    echo $user_id;
});

Maybe there is an error in your code?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)