Replies: 4 comments 3 replies
-
well the field you are looking for is indeed the field table user_login.(guessing meant = customtitile aka 'real name' . furthermore : the displayname is mostly often used on topbars... and using that for using customtitle (if wanted) lot of re -programming.. ???? |
Beta Was this translation helpful? Give feedback.
-
So if I want a safe user name and display Full name (Name and Surname) when browsing site, what fields and settings should I use? e107 core settings isn't really set up to have separate First Name and Last Name. You could add your custom fields in Users > Extended User Fields and then you can access them in your own plugins. You can make these new fields requires to sign up, too. I think you can also deploy your new Extended User Fields along with your plugin via the plugin.xml file, just be sure to use a very unique field name (eg.
Above is modified from the e107 Developer Manual. How you can specify the label for these fields is unclear.
There is a setting in Preferences > Signup Page Options > Display name and login name may be different for: [Select User Class] where you can modify this behavior and even Reset ALL Display Names which simply copies DB Fields:
|
Beta Was this translation helpful? Give feedback.
-
@Vodhin I know most of the things you wrote, I can help myself, but I can't give e107 installation to any client, I can't get money then and I can't support e107 more... It is very embarrassing if I convince them to use e107 and trivial things are not working as they should do. User management - or membership site - is one area where is e107 better than WordPress, so why does it have to fail on so trivial things? _Ok, I take it, main admin can always different display name, let it be, no big issue. _ {during installation you can set a different name for main admin, safety reason etc) But then why Quick add user allows you set display name? At least notice that a different display name is not allowed. Ok, I take it, it is admin part, you should know what you are doing If I fill display name and mark random user name, why still required? With random user name, entered display name is generated too - why there is at least a notice about not allowing different names? Why there is check for this value if it is not marked required? And display name is filled from login name? Why I can delete display name in edit mode? Why login name is not displayed then in user list if display name is missing? etc etc... I haven't started with frontend and national characters. I can set different names. Why it ignores my settings about different values? This is probably correct, I don't know, no idea how this should work So your explanation is good for anybody who wants to know how it works now and how it is confusing now. What I want to know is How this should work or how this was planned to work? If I know this, I can create a bug issue if it is doesn't work as planned. Or ask if it works for others and look for issue in my code only. |
Beta Was this translation helpful? Give feedback.
-
@Jimmi08
seems to identify several bugs, if not just quirky behaviour that needs cleaning up. I think you should post that exactly as it is as a bug report. I agree this should not be happening. |
Beta Was this translation helpful? Give feedback.
-
I am confused (again) about display and login name.
I used login event (not sure what now - user_login or login ) and data are
after login, I needed to log in to another part of the system. I couldn't because the correct login name is not part of the data.
You can't use
e107::user(USERID);
in e_event - it is too soon. Or at least I got the error about not existing function.So I moved this functionality to e_module and found that I need the field 'user_loginname'
So, I am correct with this mapping?
WP vs e107 ($data)
$login_data['username'] = $data['user_loginname'];
$login_data['user_nicename'] = $data['user_name'];
/*
$login_data['useremail'] = $data['user_email'];
$login_data['hashed_password'] = $data['user_password'];
*/
For login in e107 I need user_loginname value, correct? So why does the event work with user_name but the value is login name?
The problem is that the display name can have national characters or spaces and that can always cause trouble.
I checked the code and in the login handler value user_name is used,
Here user_name has priority...
return ($this->get('user_name') ? $this->get('user_name') : $this->get('user_loginname'));
Really? In the admin area, it looks just like the nice pretty name.
I tried to look at the real name and it is called in database user_login.
So if I want a safe user name and display Full name (Name and Surname) when browsing site, what fields and settings should I use?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions