should be separated method in User class, $user->resetPassword($password);