 					user.firstname =		@mdl.model.firstname_new
 					user.lastname =			@mdl.model.lastname_new
 					user.save()
+
+					@editPosts()
+
 					@emit 'success'
 
 			else

EventEmitter = 							require('events').EventEmitter

User = 									mongoose.model('User', require(global.home + '/script/views/db/user'))

class Edit extends EventEmitter


			else
				callback(user)			if callback?

	
	editPosts: () ->

		Post.update
			'author.id':				@mdl.model.id
		,
			'author.firstname':			@mdl.model.firstname_new
			'author.lastname':			@mdl.model.lastname_new
		,
			multi:						true

		.exec()


exports = module.exports = (req, res) ->
