The invention relates to a cosmetic method for treating human body odors. Said method includes: (i) applying, to the skin, a composition containing a polymer (I) wherein R' is, separately, H or an acetyl grouping or a -CO-L-X grouping, the polymer containing at least one R' = -CO-L-X grouping, L being a divalent hydrocarbon group containing 1 to 20 carbon atoms, X denoting a photoactive azide or diazirine group, and n ranging from 5 to 2000; then (ii) exposing the skin to visible light. The method used on the skin can also be used on materials for deodorizing malodorous environments such as shoe soles or clothing.L'invention concerne un procédé cosmétique pour traiter les odeurs corporelles humaines comprenant : (i) l'application sur la peau d'une composition comprenant un polymère (I) dans laquelle R' représente indépendamment H ou un groupement acétyle ou un groupement -CO-L-X, le polymère renfermant au moins un groupement R' = -CO-L-X, L étant un groupe divalent hydrocarboné comprenant de 1 à 20 atomes de carbone, X désigne un groupe photoactif de type azide ou diazirine; n varie de 5 à 2000; (ii) puis l'exposition la peau à un rayonnement lumineux. Le procédé appliqué sur la peau peut également être appliqué sur des matériaux destinés à désodoriser des environnements malodorants tels que des semelles de chaussure, des vêtements.