Forgot passcode iphone.

I bought my iphone to my friend and he forgot the encryption code. :so then i can't reset the iphone because they asking for the 4 code. I just wondering if this case can lock my iphone forever?
Welcome to iMore! You'll need to erase your device and then set it back up. This will require the Apple ID and password associated with that device.

https://support.apple.com/en-us/HT204306

Original thread: https://forums.imore.com/threads/forgot-passcode-iphone.381304/