Suppose I logged via LDAP in to my website for the first time, then it will hash my ldap password into the wp_users table, right?
Incorrect; the LDAP password is ONLY used for the LDAP user authentication to verify that the user logging in has the correct credentials to match against LDAP. Once that authentication is processed as valid by Authorizer, a couple of different things happen:
1. If the user does not exist in WordPress, a new WordPress user account is created. The email and username from LDAP are used to create this user. A new random password completely unrelated to the LDAP password is generated and stored in the WP_USERS table.
1. If the user DOES exist in WordPress, then the user is logged in. No change occurs to the WordPress user account.
In both cases, the LDAP password is only used for authentication against LDAP. It never gets stored in WordPress.
If your LDAP account gets deleted, the WordPress user will remain. However, the user will be unable to log in with LDAP credentials. They would have to reset their WordPress password and use local account authentication instead. We do this because WordPress users are tied to the content that they create, and deleting a WordPress user account is a process that needs to take into account how you reassign ownership of this content.
If the WordPress account is deleted, then depending on the settings in Authorizer, a new WordPress user account will be created if the LDAP user attempts to log in again. Authorizer has different settings for whether to just allow all external account authentications to have accounts created, or to put them in an admin queue to be verified by the WordPress admin user before being allowed into WordPress.