It may be the case that he did not do his due diligence to sufficiently anonymize them. This is from the APA:
4.07 Use of Confidential Information for Didactic or Other Purposes
Psychologists do not disclose in their writings, lectures, or other public media, confidential, personally identifiable information concerning their clients/patients, students, research participants, organizational clients, or other recipients of their services that they obtained during the course of their work, unless (1) they take reasonable steps to disguise the person or organization, (2) the person or organization has consented in writing, or (3) there is legal authorization for doing so.
4.07 Use of Confidential Information for Didactic or Other Purposes
Psychologists do not disclose in their writings, lectures, or other public media, confidential, personally identifiable information concerning their clients/patients, students, research participants, organizational clients, or other recipients of their services that they obtained during the course of their work, unless (1) they take reasonable steps to disguise the person or organization, (2) the person or organization has consented in writing, or (3) there is legal authorization for doing so.
https://www.apa.org/ethics/code