diff options
Diffstat (limited to 'libbe/ui/util')
-rw-r--r-- | libbe/ui/util/user.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libbe/ui/util/user.py b/libbe/ui/util/user.py index f2c7511..10b2b96 100644 --- a/libbe/ui/util/user.py +++ b/libbe/ui/util/user.py @@ -73,9 +73,8 @@ def get_fallback_fullname(): def get_fallback_email(): """Return an email address extracted from environmental variables. """ - hostname = gethostname() - name = get_fallback_username() - return "%s@%s" % (name, hostname) + return os.getenv('EMAIL') or '%s@%s' % ( + get_fallback_username(), gethostname()) def create_user_id(name, email=None): """Create a user ID string from given `name` and `email` strings. |