authenticate user without password from email activation link [duplicate]

To login a user progrmaticly you can use:

    //Login the user
$creds = array();
$creds['user_login'] = $login;
$creds['user_password'] = $password;
if ( !empty( $remember ) ){ 
    $creds['remember'] = true;
}
$user = wp_signon( $creds, true );

but as you can see you will need to have the password present , so you can just add to your actovation url &pw=pasword and call it using $_GET[‘pw’].

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