Joomla! - Database tables related with users - database

I wanna make my own registration form as i need to include extra fields for the users. And it seems that there isn't any FREE extensions that is able to do it. So i have to find out how to insert the users into the database.
I have found out that there are 3 tables related with each other when creating a new user:
1. jos_users
2. jos_core_acl_aro
3. jos_core_acl_groups_aro_map
But i am running Joomla! 2.5.1 for my website and my database does not have jos_core_acl_aro and jos_core_acl_groups_aro_map tables!!
May i know what are the tables to take note of when i'm doing my own registration form?
Thanks in advance!

What you want is actually two things:
Your own registration form
add fields to jos_users
If you're looking for a plugin for the registration form:
http://extensions.joomla.org/extensions/clients-a-communities/user-management/13753
Steps to add fields for jos_users you can find here:
http://forum.joomla.org/viewtopic.php?p=2654947

You have to add an entry to #__user_usergroup_map, the 2nd field "group_id" must exist at #__usergroups.

Related

How can i get elements in select using by example, whereDoesntHave in Laravel 8 and Filament?

I've three tables Users, company and user_company (pivot). I need to, for example, associate users to a company in a form using select that show me only the user are nit associated to this company.
Could anybody help me?
Thanks in advance
check the Filaments Documentation on the relationshipmanager AND
#Attaching and detaching records either manually or by --attach when creating the relationship manager
Ensure withPivot is included in the EloquentModel and check the getRelations in the modelresource
See docs #Populating automatically from a relationship
This works for me:
Forms\Components\Select::make('companyId')
->multiple()
->relationship('companies','company_name'),

Set up relation on two existing Salesforce objects

I have a custom object in Salesforce which I need to setup a Master Detail relationship from Accounts. Accounts being the Master and CompHist being the Detail. The problem I am running into is that I need to set the relation to work off of custom fields within the objects. Example:
1.) Accounts has a custom field called CustomerId.
2.) CompHist also has custom field called CustomerId.
3.) I need to be able to have this linked together by CustomerId field for report generation.
About 2,000 records are inserted into CompHist around the 8th of each month. This is done from a .NET application that kicks off at the scheduled time, collects info from our databases and then uploads that data to salesforce via the SOAP API.
Maybe I'm misunderstanding how Salesforce relationships work as I am fairly new (couple months) to salesforce development.
Thanks,
Randy
There is a way to get this to work without triggers that will link the records or pre-querying the SF to learn Account Ids in .NET before you'll push the CompHistories.
Setup
On Account: set the "External ID" checkbox on your CustomerId field. I'd recommend setting "Unique" too.
On CompHist: you'll need to make decision whether it's acceptable to move them around or when the relation to Account is set - it'll stay like that forever. When you've made that decision tick / untick the "reparentable master-detail" in the definition of your lookup / m-d to Account.
And if you have some Id on these details, something like "line item number" - consider making an Ext. Id. for them too. Might save your bacon some time in future when end user questions the report or you'll have to make some kind of "flush" and push all lines from .NET (will help you figure out what's to insert, what's to update).
At this point it's useful to think how are you going to fill the missing data (all the nulls in the Ext. Id) field.
Actual establishing of the relationship
If you have the external ids set it's pretty easy to tell salesforce to figure out the linking for you. The operation is called upsert (mix between update and insert) and can be used in 2 flavours.
"Basic" upsert is for create/update solving; means "dear Salesforce, please save this CompHist record with MyId=1234. I don't know what's the Id in your database and frankly I don't care, go figure this out will ya?"
If there was no such record - 1 will be created.
If there was exactly 1 match - it will be updated.
If there were more than 1 found - SF won't know which one to update and throw error back at you (that's why marking as "unique" is a good idea. There's a chance you'll spot errors sooner).
"Advanced" upsert is for maintaining foreign keys, establishing lookups. "Dear SF, please hook this CompHist up to Account which is marked as "ABZ123" in my DB. Did I mention I don't care about your Ids and I can't be bothered to query your database first prior to me uploading my stuff?"
Again - exact match - works as expected.
0 or 2 Accounts with same ext. id value = error.
Code plz
I'd recommend you to play with Data Loader or similar tool first to get a grasp. of what exactly happens, how to map fields and how to not be confused (these 2 flavours of upsert can be used at same time). Once you'll manage to push the changes the way you want you can modify your integration a bit.
SOAP API upsert: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_upsert.htm (C# example at the bottom)
REST API: http://www.salesforce.com/us/developer/docs/api_rest/Content/dome_upsert.htm
If you'd prefer an Salesforce Apex example: Can I insert deserialized JSON SObjects from another Salesforce org into my org?

using single database file for multiple users

I want to make a site in which every user has his own customers and products to manage.
Whats the best way to handle this??
Is it OK to use an additional field for each entry specifying the user this entry belongs to ? or there is a better way?
Im using sql server if it matters.
Thank You.
not really much info in the question... however:
it is much simpler to scale some more data in a single database than to create additional databases. so YES - make one database.
the exact schema you choose is more subtle - normalize, and link rows to appropriate users
Do NOT I repeat do NOT create a database per user, not even a table per user.
Add a column UserID to any table that may need to reference a person with a product or order.

Database table in Magento does not exist: sales_flat_shipment_grid

We're using Magento 1.4.0.1 and want to use an extension from a 3rd party developer. The extension does not work, because of a join to the table "sales_flat_shipment_grid":
$collection = $model->getCollection()->join('sales/shipment_grid', 'increment_id=shipment', array('order_increment_id'=>'order_increment_id', 'shipping_name' =>'shipping_name'), null,'left');
Unfortunately this table does not exist n our database. So the error "Can't retrieve entity config: sales/shipment_grid" appears. If I comment this part out, the extension is working, but I guess, it does not proper work.
Does anybody know something about this table? There are a backend-option for the catalog to use the "flat table" option, but this is only for the catalog. And the tables already exists, no matter which option is checked.
As it is obvious from table name, this table contains information about shipments and is used in grid on backend. The problem is that this table was created in 1.4.1.1, so you won't find it in your store.
I see 3 ways of solving the problem:
You can create this table and write some script, that will fill it
with necessary data by cron
You can rewrite SQL-query in that 3rd party extension so that it took necessary data from other sources
You can upgrade your Magento at least to 1.4.1.1 (highly recommended)

Recommended method to handle record editing with approval in CakePHP?

I haven't been able to find any information regarding the best way to handle record editing with approval in CakePHP.
Specifically, I need to allow users to edit data in a record, but the edited data should not overwrite the original record data until administrators have approved the change. I could put the edited records in a new table and then overwrite the originals when I approve them but I wonder if there is an easier way since this idea doesn't seem to play well with the cake philosophy so to speak.
You are going to need somewhere to store that data until an administrator can approve it.
I'm not sure how this can be easier than creating another table with the new edits and the original post id. Then when an administrator approves the edit, the script overwrites the old record with the edited version.
I'm working on a similar setup and I'm going with storing the draft record in the same table but with a flag set on the record called "draft". Also, the original record has a "draft_id" field that has the id of the draft record stored in it.
Then in the model when the original record is loaded by the display engine it shows it normally. But when the edit or preview actions try to load the record, it checks the "draft_id" field and then loads the other record if it's set.
The "draft" flag is used to keep list and other group find type actions from grabbing the draft records too. This might also be solved by a more advanced SQL query but I'm not quite that good with SQL.

Resources