Verify a user pasword

Hi everyone.

I want to verify if an user existing password is the same with a typed user password.

I’ve tried to use BonitaUsers.getUser(apiAccessor, loggedUserId).getPassword(), but I noticed that is deprecated.

Is there a way to compare only the existing password with a text which user is typing?

Thanks.

I would like to know if there is something instead of getPasword()

I’ve seen also “change-password” example here http://community.bonitasoft.com/project/change-password which has this minus: cannot verify the current password.