Commit 2f9525dd authored by Noe Nieto's avatar Noe Nieto 💬

Simplify default lastname feature

parent ae36993d
Pipeline #20079 failed with stage
......@@ -76,6 +76,3 @@ DEFAULT_FROM_EMAIL = "Do not reply <noreply@example.com>"
# This is the link to the subscribe page, used in different parts of the middleware
SUBSCRIBE_HREF = /#bundle
# This is the default last name for users created here
DEFAUL_USER_LASTNAME = @example.com
import ldap
import strictyaml
from decouple import Config, Csv, RepositoryIni
......@@ -294,6 +295,3 @@ EMAIL_USE_SSL = config('EMAIL_USE_SSL', False, cast=bool)
# This is the link to the subscribe page, used in different parts of the middleware
SUBSCRIBE_HREF = config('SUBSCRIBE_HREF')
# User Account last name
DEFAUL_USER_LASTNAME = config('DEFAUL_USER_LASTNAME', SITE_TITLE)
......@@ -184,7 +184,7 @@ class User(AbstractUser):
def get_woocommerce_id(self):
query = "customers?role=all&email=" + self.get_identity()
query = "customers?role=all&limit=1&email=" + self.get_identity()
json = self.woo_get_json(query)
if json is not None and len(json) == 1:
......@@ -199,7 +199,7 @@ class User(AbstractUser):
data = {
"email": self.get_identity(),
"first_name": self.username,
"last_name": settings.DEFAUL_USER_LASTNAME,
"last_name": "@" + settings.SITE_DOMAIN,
"username": self.get_identity(),
"password": make_password(None), # unusable password
"billing": {"email": self.email}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment