def add_to_user(self, user, next):
        """
        Works exactly the same as L{add_to_project} but for a user.
        """
        prefix = self.__class__.get_url_name_prefix()
        try:
            return reverse("%s_aggregate_user_add" % prefix,
                           kwargs={'agg_id': self.id,
                                   'user_id': user.id})+"?next=%s" % next
        except NoReverseMatch:
            give_permission_to("can_use_aggregate", self.as_leaf_class(), user)
            return next
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/clearinghouse/aggregate/models.py/Aggregate.add_to_user/original