Get User Id by Display Name Wordpress Templates

WordPress.org
in this case a form is used to allow users to change their registered email, and one can validate the change by making sure that the new submitted email is not already in use and does not belong to the current user.