Properties for the User type only customizes Umbraco backoffice. recently I had to do it in a project. We create a custom table with the properties we want. This table has relationship with Umbraco users table. And edit user page source code.
code path that needs to change:
/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
I have an example, but it's all in Portuguese. I will search and post here.
Certainly. But depending on need is an alternative. My project do not want to upgrade at this time. And the documentation made it clear that any update should consider this customization. Another alternative would be to create a custom section. But it would take a long time to create.
This code is only available if you downloaded the code source of Umbraco.
If you do not have the source code. Create a class within your namespace, MyNamespace.EditUser. You can create a Class Library project or create a C # file in the App_Code.
Search on the Web project the aspx /Umbraco/Users/EditUser.aspx
Replace the directive Page that looks like this:
<%@ Page Language="c#" Codebehind="EditUser.aspx.cs" MasterPageFile="../masterpages/umbracoPage.Master" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Users.EditUser" %>
Replace the example below, and put Inherits = MyNamespace.EditUser.
How to add property in [Backend] user?
Hello,
I am new with Umbraco I want to add new property in Admin Panel > User
in user we can see all of user properties e.g Name, Username, Email etc. I want add new property, let say the property is Country.
anyone can help me to do this?
Thank You
Hi Amir,
Can I just check - are you using these "users" to login to a front end website - if so you should be looking at "members".
For backend users (editors etc) I'm not sure you can add custom properties. I might be wrong?
Steve
Hello Steve
Can I log in to Backend Panel as a member not as a user / admin?
Hi Amir,
No - at least not anyway that I'm aware of.
Steve
Properties for the User type only customizes Umbraco backoffice. recently I had to do it in a project. We create a custom table with the properties we want. This table has relationship with Umbraco users table. And edit user page source code.
code path that needs to change: /Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
I have an example, but it's all in Portuguese. I will search and post here.
This would make upgrades more difficult of course!
Certainly. But depending on need is an alternative. My project do not want to upgrade at this time. And the documentation made it clear that any update should consider this customization. Another alternative would be to create a custom section. But it would take a long time to create.
I found the code.
Published here: https://gist.github.com/marciogoularte/96104cdaea5760ad80c9a3155e959f08
Added type fields Phone and Department. Umbraco versão 7.3.3
Replace EditUser.aspx.cs in /Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
I created tables with Peta Poco and modify the code to save additional properties. With that I think you can already do what you need.
Hello Marcio
I cannot find EditUser.aspx.cs in my project (umbraco 7.5.3). where can I find the file?
This code is only available if you downloaded the code source of Umbraco.
If you do not have the source code. Create a class within your namespace, MyNamespace.EditUser. You can create a Class Library project or create a C # file in the App_Code.
Search on the Web project the aspx /Umbraco/Users/EditUser.aspx
Replace the directive Page that looks like this: <%@ Page Language="c#" Codebehind="EditUser.aspx.cs" MasterPageFile="../masterpages/umbracoPage.Master" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Users.EditUser" %>
Replace the example below, and put Inherits = MyNamespace.EditUser.
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" AutoEventWireup="True" Inherits="MyNamespace.EditUser" %>
Amir, It worked?
is working on a reply...