He advised some of his students admonishing them about avoiding the state of being proud.
1) Do not deceive yourself into becoming too proud because you are in a good or righteous environment,
for there is no place that is better than Paradise, and our father, Adamعليه السلام ,experienced there what is known to all.
2) Do not become proud merely because you worship often, for consider what happened to lblis (Satan) after he spent a great deal of time worshipping.
3) Do not think yourself great because you have met with righteous people, for there is no man more righteous than the Prophet صَلَّى ٱللّهُ عَلَيْهِ وَسَلَّمَ the disbelievers and hypocrites did not benefit by simply knowing him.
Reference: Gems and Jewels