-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBLC.py
More file actions
33 lines (26 loc) · 842 Bytes
/
BLC.py
File metadata and controls
33 lines (26 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from Models import *
from DALC import *
from tkinter import *
def check_login(email,pwd):
for user in getAllUsers():
if user.email == email and user.password == pwd:
Logged_user.id = user.id
Logged_user.name = user.name
Logged_user.email = user.email
Logged_user.password = user.password
Logged_user.phone = user.phone
return True
return False
def addNewUser(name,email,password,phone):
user = User()
user.name = name
user.password = password
user.email = email
user.phone = phone
addUser(user)
def emailValidation(email):
user = User()
user.email = email
if user.email.endswith("@gmail.com") or user.email.endswith("@yahoo.com") or user.email.endswith("@hotmail.com"):
return True
Logged_user = User()