INNER CODE UNIT · Python
get_user_id
pgalko/BambooAI · web_app/app.py:60
def get_user_id():
"""Get current user ID dynamically based on auth mode - file system safe version"""
try:
user_id = get_current_user_id() # This gets the full Auth0 ID
# Extract numeric part after pipe for file system safety
if '|' in user_id:
return user_id.split('|')[1] # Return just "110366262980475577308"
return user_id
except RuntimeError:
return logger.warning("Failed to get user ID")
def user_path(root, *paths):
"""Helper to build a user-specific path using dynamic user ID."""
user_id = get_user_id()