This a lockout and can cause the ll big problems. Tenant has possession until they leave or the court orders them out.
Not legal if the tenant had a right to possess the property until some time AFTER the locks were changed. Possibly, if the tenant left apartment vacant, and left door unlocked, with a risk that someone may enter premises and cause damage... the landlord may have a defense that he was securing the premises, but sounds as if that's not the case. Good luck
Attorney Bonanno's answers to questions are for general purposes only and do not establish an attorney-client relationship. You should carefully consider advice from an attorney hired and who has all facts necessary to properly advise a client, which is why these answers to questions are for general purposes only and do not establish an attorney-client relationship.