feat: email as name field for community member
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"allow_guest_to_view": 1,
|
"allow_guest_to_view": 1,
|
||||||
|
"autoname": "field:email",
|
||||||
"creation": "2021-02-12 15:47:23.591567",
|
"creation": "2021-02-12 15:47:23.591567",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@@ -78,7 +79,7 @@
|
|||||||
"has_web_view": 1,
|
"has_web_view": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-03-12 10:23:09.709669",
|
"modified": "2021-03-12 17:41:32.786762",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Community",
|
"module": "Community",
|
||||||
"name": "Community Member",
|
"name": "Community Member",
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ class CommunityMember(WebsiteGenerator):
|
|||||||
if self.user_name:
|
if self.user_name:
|
||||||
if len(self.user_name) < 4:
|
if len(self.user_name) < 4:
|
||||||
frappe.throw(_("Username must be atleast 4 characters long."))
|
frappe.throw(_("Username must be atleast 4 characters long."))
|
||||||
if not re.match("^[A-Za-z0-9]*$", self.user_name):
|
if not re.match("^[A-Za-z0-9_]*$", self.user_name):
|
||||||
frappe.throw(_("Username can only contain alphabets, and numbers."))
|
frappe.throw(_("Username can only contain alphabets, numbers and underscore."))
|
||||||
self.user_name = self.user_name.lower()
|
self.user_name = self.user_name.lower()
|
||||||
|
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"login_required": 1,
|
"login_required": 1,
|
||||||
"max_attachment_size": 0,
|
"max_attachment_size": 0,
|
||||||
"modified": "2021-03-12 10:23:37.625177",
|
"modified": "2021-03-12 18:14:19.363139",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Community",
|
"module": "Community",
|
||||||
"name": "update-profile",
|
"name": "update-profile",
|
||||||
@@ -60,19 +60,6 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"show_in_filter": 0
|
"show_in_filter": 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"allow_read_on_all_link_options": 0,
|
|
||||||
"fieldname": "email",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"label": "Email",
|
|
||||||
"max_length": 0,
|
|
||||||
"max_value": 0,
|
|
||||||
"options": "Email",
|
|
||||||
"read_only": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"show_in_filter": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_read_on_all_link_options": 0,
|
"allow_read_on_all_link_options": 0,
|
||||||
"fieldname": "short_intro",
|
"fieldname": "short_intro",
|
||||||
|
|||||||
Reference in New Issue
Block a user