What Prophet prohibited is not crying, but getting to a state called jazza, where the person do things like beating himself, or objecting what Allah did.
Crying is an emotional case, which can not be controlled. Even Prophet himself cried when his son Ibrahim died.