Changes the add_user function's unlimited_user parameter to default to False.

This commit is contained in:
Whispering Wind
2025-08-13 23:35:02 +03:30
committed by GitHub
parent 9afada3dc5
commit 5968903d0d
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ from datetime import datetime
from init_paths import *
from paths import *
def add_user(username, traffic_gb, expiration_days, password=None, creation_date=None, unlimited_user=True):
def add_user(username, traffic_gb, expiration_days, password=None, creation_date=None, unlimited_user=False):
"""
Adds a new user to the USERS_FILE.
@ -19,7 +19,7 @@ def add_user(username, traffic_gb, expiration_days, password=None, creation_date
expiration_days (str): The number of days until the account expires.
password (str, optional): The user's password. If None, a random one is generated.
creation_date (str, optional): The account creation date in YYYY-MM-DD format. If None, the current date is used.
unlimited_user (bool, optional): If True, user is exempt from IP limits. Defaults to True.
unlimited_user (bool, optional): If True, user is exempt from IP limits. Defaults to False.
Returns:
int: 0 on success, 1 on failure.