In this work, we consider a multiuser cooperative wireless network where the energy-constrained sources have independent information to transmit to a common destination, which is assumed to be externally powered and responsible for transferring energy wirelessly to the sources. The source nodes may cooperate, under either decode-and-forward or network coding-based protocols. Taking into account the fact that the energy harvested by the source nodes is a function of the fading realization of inter-user channels and user-destination channels, we obtain a closed-form approximation for the system outage probability, as well as an approximation for the optimal energy transfer period that minimizes such outage probability. It is also shown that, even though the achievable diversity order is reduced due to wireless energy transfer process, it is very close to the one achieved for a network without energy constraints. Numerical results are also presented to validate the theoretical results.