I'm building a SaaS app in PHP that will involve users storing their client's names and addresses in our database. I intend to encrypt the data using the defuse/php-encryption library which allows individual users to have their own encryption key protected by their login password. My question is, if I do this, how do I manage the case where the user has forgotten their password? If their password is forgotten, the key is subsequently lost and I have no way of recovering it. I thought I'd be able store the key twice, one protected with the user password and the second protected by a strong admin password, with the user having to phone up to reset their account. However, from what I can see, the php-encryption library does not allow for this.
I'd like to avoid having a global key as it would have to be stored somewhere in the source code or db.