What database table is the Magento Contact Us Email Options stored in? - database

For an application I am writing, I need to know where some of the settings in the Admin Panel are being stored in a table on the database. Specifically, if one is logged into the Admin Panel, under System->Configuration->Contacts->Email Options, there are three select boxes "Send Emails To", "Email Sender" and "Email Template".
I can't seem to find what table the currently selected options are stored in. I want to do this since I am creating a transactional email via install script (I was able to find that transactional emails are stored under core_email_template), and would like it to be selected by default via my install script along with the default email being changed.I assumed that the currently selected options are somewhere on the database, I just can't seem to find where for the life of me!
I was hoping that someone would know where these settings were stored, or if someone could share some strategies to find out which table(s) hold information like this.
Thank you for any help you can offer.

It is in the core_config_data table

Related

How can I know the list of user running Apex code in our org with their respective licence type?

I have been looking for ways to list/access the list of users with with their respective type licenses(Partner or Admin or Community) running/executing apex on our org but have not found anything explaining how I can do that.
Any help to help understand how I can achieve this will be greatly appreciated.
Unclear.
There's some tracking "user X used visualforce page/apex class Y" but Event Monitoring is a paid addon, bought separately or as part of Shield (better field history tracking and encryption). You should be able to experiment with it in your Developer Edition / Trailhead Playground before deciding to buy.
Without that... you'll have to marry few queries together but the results will be so-so.
SELECT Name, UserType, Profile.UserLicense.MasterLabel, Profile.UserLicense.LicenseDefinitionKey
FROM User
WHERE IsActive = true
for license types. This is about "main" user license. Your user can have "feature licenses" (Salesforce Content User, Marketing User, Knowledge User...) that are just checkboxes on user record. And can have permission sets assigned with some managed package licenses for example.
For async jobs (scheduled, queueable, batch, #future...) you should be able to query the AsyncApexJob (keeps logs for 1 week I think) or CronTrigger + CronJobDetail to see scheduled jobs. That'll include dashboard & report runs too though, filter them out using that cronjobdetail
Last but not least you can query who has access (via profile or permission sets) to run class X - but that doesn't mean they actually run it. For that you'd need to query. Some sample queries for that are in SetupEntityAccess documentation.

Whats happend if i use the same database to connect two websites?

I have a websites agriculture related with info's.
The script is very limited and do not allow me to create a classified section to my website, so, i need to create another one.
For the new website (created on subdomain, but with the same script), if i use the same database, user accounts will be kept?
In fact, that's what interests me. My users from the info's site automatically keep their accounts on the classified site, without the need for another account.
I just want to keep user accounts and nothing else.
enter image description here
The database should keep all of the data in it regardless of how many sites its connected to, however all of said sites can now see and edit it.

Symfony4 multiple databases with same structure

For a project I want to keep data separated in multiple databases. I want to create a web-platform where there are 'companies' with 'users'
But I want to create for every company a database and switch to this database when a user goes to the company page like:
http://localhost/company/{company_name}
After that they need to login on a page like:
http://localhost/company/{company_name}/login
with the user credentials in that database.
Is there a way to generate these databases with a push on the button
and switch between them when a user visits another path?
Already thank you for your time!
Probably it is possible, but not easy.
The standard behavior is to configure the databases /entity managers/ in the config. Their parameters /name, user, password, endpoint/ are set in the environment variables. In order to have multiple databases you need to set these parameters, but eventually a restart of Apache /if you use it/ may be required.
You can check here for ideas.

Where can I get Jira's database structure for service desk?

I want to build service desk dashboards and I want to look at a database structure with a ticketing system to understand exactly what am I going to need. I am working with Jira already and I wanted to check its database, but I haven't found what I need.
Thanks in advance!
On the administrator's System page sidebar, there's a "Plugin Data Storage" menu item that will show you what database tables correspond to each add-on. From there you can see that Service Desk table names usually begin with AO_54307E.
You shouldn't need to access the database directly. Check https://docs.atlassian.com/jira-servicedesk/REST/server/ for whether the information you need is available via the REST API.

Laravel database sessions

I'm building a Laravel website and I'm using the database driver to manage sessions. I created the sessions table in database and migrated with php artisan. Everything works as expected.
What I really want to do now is to check the role of the users that are online but I don't know how to get this with the fields of the sessions table in the database.
I don't really understand how the sessions table work, because I see that it registers a new row when I access to the login page, but it doesn't change when the user has logged in and when the user has logged out.
All I wanted is to check the role of the users active in the app....
Someone can help me with how to get to this?
Thank you!
I suggest you a very simple way. Just in your users table add a field called "is_online" that is 0 by default. When the user logs in , just change it to 1 and when he logs out change it back to 0. So DB::table('users')->where('is_online' , 1)->all() returns the online users.

Resources