Utils User
inyoka.utils.user
Several utilities to work with users.
Some parts are ported from the django auth-module.
- copyright:
2007-2024 by the Inyoka Team, see AUTHORS for more details.
- license:
BSD, see LICENSE for more details.
- inyoka.utils.user.check_activation_key(user, key)
Check if an activation key is correct
- Parameters:
- user
An user object a new key will be generated for. (For checking purposes)
- key
The key that needs to be checked for the user.
- inyoka.utils.user.gen_activation_key(user)
It’s calculated using a sha1 hash of the user id, the username, the users email and our secret key and shortened to ensure the activation link has less then 80 chars.
- Parameters:
- user
An user object from the user the key will be generated for.
- inyoka.utils.user.is_valid_username(name)
Check if the username entered is a valid one.