https://github.com/cfunkz/customtkinter-login-registration
Registration and login app made using customtkinter.
https://github.com/cfunkz/customtkinter-login-registration
customtkinter python python3 sql sqlite3 tkinter
Last synced: 10 months ago
JSON representation
Registration and login app made using customtkinter.
- Host: GitHub
- URL: https://github.com/cfunkz/customtkinter-login-registration
- Owner: cfunkz
- License: gpl-3.0
- Created: 2023-09-28T17:27:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-15T02:58:08.000Z (about 1 year ago)
- Last Synced: 2025-04-14T18:12:16.544Z (10 months ago)
- Topics: customtkinter, python, python3, sql, sqlite3, tkinter
- Language: Python
- Homepage:
- Size: 2.34 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
 
# CustomTkinter-Login-Registration
Registration and login app made using customtkinter with simple input validation.
This includes a sqlite3 database setup with many functions including saving the registration data, logging in, password reset, security questions, country selection, and more. Change the config.py file for your details to test e-mail functions. You can get the Gmail app password [HERE](https://myaccount.google.com/apppasswords)
## Table of Contents
- [Prerequisites](#prerequisites)
- [Screenshots](#screenshots)
- [User Database Functions](#user-database-functions)
- [UI Functions](#ui-functions)
- [Installation](#installation)
- [Configuration](#configuration)
- [Contributing](#contributing)
## Prerequisites
Before you begin, ensure you have met the following requirements:
- `tkinter`: You can install tkinter using `pip install tkinter`.
- `customtkinter`: You can install customtkinter using `pip install customtkinter`.
- `pycountry`: You can install pycountry using `pip install pycountry`.
- `Pillow`: You can install Pillow using `pip install Pillow`.
## Screenshots






## User Database Functions
The following functions are used for managing user data in a SQLite database.
### `get_database_connection()`
- Opens a database connection and returns the connection and cursor.
### `close_database_connection(db)`
- Closes the provided database connection.
### `register_user(first_name, last_name, country, username, email, password, security_question, security_answer)`
- Registers a new user with the provided information.
- Returns `True` for successful registration, or `False` if the username or email is already in use.
### `check_login(username, password)`
- Checks if the provided username and password match a record in the Users table.
- Returns `True` for a successful login, or `False` for an unsuccessful login.
### `email_exists(email)`
- Checks if an email address exists in the Users table.
- Returns user data if the email exists, or `None` if not found.
### `update_password(email, temporary_password)`
- Updates the user's password with a temporary password.
- Returns `True` for a successful password update, or `False` for a failure.
### `get_security_question(email)`
- Retrieves the security question associated with the given email address.
- Returns the security question or `None` if the email is not found.
### `check_security_answer(email, provided_answer)`
- Checks if the provided security answer matches the stored security answer associated with the email address.
- Returns `True` if the security answer matches, or `False` if it does not.
### `is_valid_email(email)`
- Validates if the provided email address follows the standard email format.
- Returns `True` for valid email addresses, or `False` for invalid ones.
### `is_valid_chars(input_string)`
- Validates if the provided characters are english without spaces.
### `is_valid_chars_space(input_string)`
- Validates if the provided characters are english spaces allowed.
### `generate_temporary_password(length=8)`
- Generates a random temporary password of the specified length (default is 8 characters).
### `send_password_reset_email(email, temporary_password)`
- Sends a password reset email to the provided email address with the temporary password.
## UI Functions
The following functions are used for UI-related tasks.
### `test_buttons()`
- A placeholder function to test button functionality.
### `toggle_password(p_block, show_password_var)`
- Toggles the visibility of a password entry field based on a Boolean variable.
### `get_countries()`
- Retrieves a list of country names sorted in alphabetical order.
## Installation
To install CustomTkinter-Login-Registration, follow these steps:
1. Clone this repository:
```bash
git clone https://github.com/didis97/CustomTkinter-Login-Registration.git
2. Install Imports:
```bash
pip install tkinter customtkinter pycountry Pillow
## Configuration
Before using the application, configure the `config.py` file with your email and SMTP server details.
## Contributing
Contributions are welcome! Please feel free to open an issue or create a pull request.