Maintain parallel, identical databases: MySQL and SharePoint FBA - mysql

I have 2 websites, and both have a login system, where the user can create an account to access a special portion of our website. Website A is a standard LAMP creation, and the user information is thus stored in a MySQL database. Website B is a site that is hosted on SharePoint and the user information is stored in a SharePoint Form Based Authentication (FBA) database.
I want to make it so that when a user creates an account on Website A, an account is automatically created on Website B.
Does anybody know of an easy way to do this? I'm thinking when the account is created on Website A, the website can send a query to both databases and create the same information. OR the 2 databases could be kept in sync somehow.
Any help would be greatly appreciated! Thanks much.

Regarding your first method: I think it's not good solution because you have to wait until server b won't response. Better way is to use event model based on queue.
You have queue of ids which are new created users and add user_id from the first server to this queue during user's creation. From other side you have cron script with infinite loop
while(1) {
sleep(10);
//check new user_id in queue
if (no) {
continue;
}
//create a new user in server B and remove user_id from queue
}

Related

Xcode: best way to create a user login and a place that can hold an array associated to their login

I'm looking for some help. I am about to delve into something I am relative new to. I am am trying to create a system for my app where a user can create an account and login and once they have done so it uploads an array to a database so that the array can be retrieved by other users.
I understand that this is kind of complicated, but I'm sure somebody has experienced this issue before. I have read about mysql but I'm not sure if when the user creates an account, that I can upload the array and it can be accessed by other contacts.
If someone could give me links to tutorials that you found helpful then it would be greatly appreciated.
Pseudo code would be:
User 1 creates account.
User 1 logs in.
App uploads array to users account stored online.
When user 2 logs in (assuming he has created an account)
He adds the first user as a contact of app.
He downloads the array of user 1 and uploads his array

Structuring a booking website

I am very new to web development, and I'm trying to get my head around the most efficient method in creating the website.
The premise of the website is for booking activities in various locations. Processes I believe that would take place are:
Customer books activity;
Request updates database, and request is sent to vendor;
If vendor approves request, confirmation is sent to customer in the form of QR code, barcode, and numerical code (for redemption);
If approved, customer is charged the amount of the activity.
My question is what structure should I use in approaching this problem? My thoughts at the moment is placing the website in Google' app engine, using mySQL database.
Any thoughts would be greatly appreciated.
If you're using GAE, I suggest looking into NDB Datastore. https://cloud.google.com/appengine/docs/python/ndb/
Customer books activity → a) store in ndb datastore and b) verify that information → send to vendor
Confirmation (display URL code e.g. http://website.com/?c=generaterandomlongstringhere)
If URL is clicked, you can add a confirm as well after like accept | decline (e.g. http://website.com/?c=generaterandomlongstringhere&?v=acceptordecline)
Update NDB and Charge user

WHMCS API-- provisioning mySQL

I'm trying to use the WHMCS API / provisioning module to auto-create a mysql database for a new WHM / cPanel client after their order for hosting goes through.
It seems like it should be simple enough to do, but I can't find anything about it in the docs. The WHMCS module is connected to the WHMCS mysql instance, but I would want to be connecting the "main" local mysql instance where the client's data is held.
Would I simply connect to localhost in the provisioning module, and create a new database and user? Or is there a more robust way to handle this without going outside the WHMCS / WHM system.
Please provide examples if possible!
Thanks for any help
I would use whmcs's hooks. A hook is function that is fired as a result of an internal action.
You should look for the invoice items after the invoice is paid but before the email in case you want to send database information if not then after paid should be fine
This would go in billing dir / includes / hooks
and it would look like
function init_InvoicePaidPreEmail($vars) {
// create your db code here be sure to look for the specific invoice item "order for hosting"
}
add_hook("InvoicePaidPreEmail",1,"init_InvoicePaidPreEmail","");

ios/Android targeted push notifications in AIR app

I was wondering if it is possible to have multiple custom push notifications setup in a single AIR App.
What I am trying to do is allow users to setup custom alerts based on information they would like to receive for example say user 1 would like to know when new actions or drama movies are released on DVD, user 2 would like to know when new comedies are released, user 3 would like to know when any new movie is released.
This is a simple example and there are possibly 1000's of options (postcode/zip information).
Thanks
Technically, there's nothing that wouldn't allow you to do this.
The implementation is mostly backend related though, let me just quickly draft a design for that here;
The user's device registers for push notifications at your backend service.
Your service takes the user's id stores in a DB and passes the device token to the corresponding push notification server.
Once the registration is completed, the user selects what items he'd like to get notified of (naturally your backend service has to know this information as well to store it in the DB).
As soon as a new action movie (or whatever kind of information the user registered for) is available, your service looks in the DB what users registered for that kind of movies and sends a message via push.
So a simple database and some server side scripting will get you going.

Magento backend customer creation not syncing with api_user table

Currently, if we create a customer in the admin panel / backend of our site, that customer is unable to login using the email address we used in creating the customer profile. Even after resetting the password using a custom and self -generated one.
I looked at the database and noticed that customers’ emails that sign-in through the front are placed in the api_user table and customers created in the backend are placed in the customer_entity table.
Anyone know why this is? Is it a latency from 1.3.2 and is hiccuping from our upgrade to 1.4.0.?
Thanks again for any and all help.
Well dibbly do. I solved this issue by going into:
Configuration > Customer Configuration > Share Customer Accounts > Global
Then, in the backend admin account creation I made sure to select the proper store for the customer being created.