         else
             callback list
 
-    updateUser : (req, res, next) =>
-        console.log "update user"
+    updateUserPassword : (req, res, next) =>
+        param = req.body
+        if param? and req.params.id?
+            if param.password? and param.passwordconfirm?
+                if param.password is param.passwordconfirm
+                    Db.update 'user', req.params.id, {password:md5(param.password)}, () =>
+                        res.send 200
+                else
+                    res.send 400
+            else
+                res.send 400
+        else
+            res.send 400
+
+    updateUserMail : (req, res, next) =>
+        param = req.body
+        if param? and req.params.id?
+            if param.mail?
+                Db.find 'user', {'mail': param.mail}, (body) =>
+                    if not body? or body.length is 0
+                        Db.update 'user', req.params.id, {mail:param.mail}, () =>
+                            res.send 200
+                    else
+                        res.send 400
+            else
+                res.send 400
+        else
+            res.send 400
 
     deleteFriend : (req, res, next) =>
         console.log "delete friend"

                Db.getBy 'user', { id_room:friend.id_room }, (docs) =>
                    if docs?
                        if docs.length is 0
                            console.log 'rid_not_found'
                            res.send 400
                        else
                            friend.nbInRoom = docs.length
                            list.inroom.push friend
                            @requestFriendRoom friends, offset + 1, list, callback
                    else
                        console.log 'rid_not_found'
                        res.send 400
            else
                list.offline.push friend

                    else
                        res.send 400
            else
                res.send 400
        else
            res.send 400

    requestUser : (friends, offset, infos, callback) =>
