Thanks for your advises - I have implemented the function client_get_id to determine the correct client_id.
But now I've figured a new problem:
When passing the array $params_old to the mailuser_update function the md5 encoded password is encyrpted again. So the md5-encrypted Password is again md5 encrypted and obviously the entered user-password does not match the stored password in the database.
Any suggestions on that?