def activate_user(self, activation_key):
        # Make sure the key we're trying conforms to the pattern of a
        # SHA1 hash; if it doesn't, no point trying to look it up in
        # the database.
        if SHA1_RE.search(activation_key):
            try:
                profile = self.get(activation_key=activation_key)
            except self.model.DoesNotExist:
                return False
            if not profile.activation_key_expired():
                user = profile.user
                user.is_active = True
                user.save()
                profile.activation_key = self.model.ACTIVATED
                profile.save()
                return user
        return False
Connects a given DatagramProtocol to the given numeric UDP port.
dataset/ETHPy150Open nathanborror/django-registration/registration/models.py/RegistrationManager.activate_user--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/internet/posixbase.py/PosixReactorBase.listenMulticast