Mandatory custom registration field		
	
	
	
		
	
	
	
	
	
		
		
				
	
		Less
		More
		
			
									- 
						Posts: 7					
- 
						Thank you received: 0					
- 
											
- 
											
 
	 
		 
		
			
	
						8 years 6 months ago				#6084
		by Bharat.Patel
	
	
		
			
			
				I am having a similar problem with populating custom fields on registration.
The standard setup uses the firstname and lastname to populate the 'name' field in the users table, and works fine
I have set up 2 new fields FirstName and LastName in the DB, and 2 new Key fields in Postman to match these, but can't work out how to get Postman to populate these. Am I missing something?			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 3194					
- 
						Thank you received: 441					
- 
											
- 
											
 
	 
		 
		
			
	
						8 years 6 months ago				#6085
		by admin
	
	
		
			
			
				Hi,
the user plugin supports the extended user profile. You can find an example in the Postman collection available here:
www.selfget.com/downloads/file/41-jbackapp-postman-collection.html
This is the payload:
{
    "username": "user123",
    "password": "password123",
    "email": "user123@mail.com",
    "firstname": "First",
    "lastname": "Last",
    "profile": {
        "tos": 1
    }
}
The "profile" field contains all the fields added by the joomla extended user profile under this "domain". Of course this only works if you have followed the "joomla way" to extend user profiles (i.e. creating an user plugin).
Kind regards,
Luigi			
 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 7					
- 
						Thank you received: 0					
- 
											
- 
											
 
	 
		 
		
			
	
						8 years 6 months ago				#6086
		by Bharat.Patel
	
	
		
			
			
				Ok. My site changes were through modified users.xml etc. so normal registration process works fine via front end and admin.
So although the jBackend post registration works for me, you are saying it will only work correctly with a plugin?			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 3194					
- 
						Thank you received: 441					
- 
											
- 
											
 
	 
		 
		
			
	
						8 years 6 months ago				#6087
		by admin
	
	
		
			
			
				Honestly I can't answer your question, because I have no experience with the way you did it. You can try to post your fields in the JSON payload, and see if it works.			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 7					
- 
						Thank you received: 0					
- 
											
- 
											
 
	 
		 
		
			
	
						8 years 6 months ago				#6088
		by Bharat.Patel
	
	
		
			
			
				I fully understand your solution using Profiles plugin, but that's not what I have done.
Let me rephrase that if that makes it easier.
I have edited the users table directly, so the new fields are in that table. I then modify the xml files so the registration process works seamlessly as if it was core Joomla.
My question is very simple: Can jBackend populate fields directly to ANY field in the users table, i.e. does it only recognise Joomla core fields or it doesn't care, it will also populate my new custom fields too.
If YES, then I should be able to do this, but my payload does not work for some reason (User gets registered BUT new field are just ignored)
If NO, then maybe I need to consider a custom solution/mod to jBackend
I hope that is a better explanation			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
	
		
				
	
		Less
		More
		
			
									- 
						Posts: 3194					
- 
						Thank you received: 441					
- 
											
- 
											
 
	 
		 
		
			
	
						8 years 6 months ago				#6089
		by admin
	
	
		
			
			
				It can't. Fields are cleansed, mainly for security reasons. So your need to consider a custom solution.			
					 
	 
			Please Log in  or Create an account to join the conversation.
	
		
			 		
													 
	 
 
	
		
	
	
	
	
	
	
 
	
		Time to create page: 0.121 seconds