  Using galaxy groups identified in the Fourth Data Release of the Sloan
Digital Sky Survey (SDSS), we compute the luminosity function for several
subsamples of galaxies in groups. In all cases, the luminosity functions are
well described by Schechter functions, down to the faintest magnitudes we
probe, $M_{\rb}-5\log(h)\sim-16$. For the general luminosity function of
galaxies in groups in the five SDSS bands, we observe that the characteristic
magnitude is brighter in $\sim 0.5$ magnitudes compared to those obtained for
field galaxies by Blanton et al.. Even when the observed faint end slope is
steeper in galaxy groups, it is statistically comparable with the field value.
We analyze the dependence of the galaxy luminosity function with system masses
finding two clear trends: a continuous brightening of the characteristic
magnitude and a steepening of the faint end slope as mass increases. The
results in $\gb$, $\rb$, $\ib$ and $\zb$ bands show the same behavior. Using
the $u-r$ color to split the galaxy sample into red and blue galaxies, we show
that the changes observed as a function of the system mass are mainly seen in
the red, passively evolving, galaxy population, while the luminosities of blue
galaxies remain almost unchanged with mass. Finally, we observe that groups
having an important luminosity difference between the two brightest galaxies of
a system show a steeper faint end slope than the other groups. Our results can
be interpreted in terms of galaxy mergers as the main driving force behind
galaxy evolution in groups.
