Imam Ali (a) is reported to have said, 

“The human being changes in three instances: when he is close to kings, when he gains positions of authority, and when he becomes wealthy. 
So whoever does not change in 
these conditions, then he is one 
who possesses a strong intellect 
and an upright character.”

Ghurar al-Hikam H. 9198