'Validate an activation key and activate the corresponding
``User`` if valid.
If the key is valid and has not expired, return the ``User``
after activating.
If the key is not valid or has expired, return ``False``.
If the key is valid but the ``User`` is already active,
return ``User``.
If the key is valid but the ``User`` is inactive, return ``False``.
To prevent reactivation of an account which has been
deactivated by site administrators, ``RegistrationProfile.activated``
is set to ``True`` after successful activation.'

def activate_user(self, activation_key, site, get_profile=False):

    if SHA1_RE.search(activation_key):
        try:
            profile = self.get(activation_key=activation_key)
        except self.model.DoesNotExist:
            return False
        if profile.activated:
            if profile.user.is_active:
                return profile.user
            else:
                return False
        if (not profile.activation_key_expired()):
            return self._activate(profile, site, get_profile)
    return False
