Play Games Gamer ID - google-play-games

I recently wanted to delete my Google Play Games Gamer ID and start over using the same Gamer ID, which I've done before with no problem. So I proceeded to delete my Gamer ID, however, in the middle of the process, an error occurred. I tried to recreate my Gamer ID immediately after, but says the username is still in use. So now I'm basically locked out of my own Gamer ID because it didn't delete the ID properly. I don't want to create a new Gamer ID, unless it's the Gamer ID that I've always had. How can I regain access to my Gamer ID?

Related

How to store sessions of a telegram bot user in my db

I wanna code a telegram bot, so when I gonna receive messages from a user I should know about last message he/she sent to me and in which step does he/she located. So I should store sessions of the user (I understood this when I searched) but I don't know what exactly should I do?
I know I need a table in a db that stores UserId, ChatId but I don't know these:
How to make a root for steps and store them in db (I mean how do I understand where the user is located now)
What are other columns that I need to store as a session?
How many messages should I store in the database? And do I need one row for each message?
If you just have to store session in your database you don't need to store messages. Maybe you could want to store also messages but it's not necessarily related.
Let's assume you have a "preferences" menu in your bot where the user can write his input. You ask for the name, age, gender etc.
How do your know when the user writes the input of it's about the name or the gender etc?
You save sessions in your db. When the bot receives the message you check in what session the user is in to run the right function.
An easy solution could be a sql database.
The primary key column is the telegram user ID ( you additionally can add a chat id column if it's intended to work both in private and group chats) and a "session" column TEXT where you log user steps. The session column can be NULL by default. If the bot expects the gender (because the user issued /gender command) you can update the column "session" with the word "gender" so when the message arrives you know how to handle it checking the gender column of that user id and as soon as you runned the right function, you update to NULL again the column "session".
you can create a db with these columns.
UserID, ChatID, State, Name, Age, Gender ...
on each incoming update you will check if user exists on you db then check the user's State and respond appropriately and update the state at the end.

Retrieving Card details from Square Customer

I'm trying to create a recurring payment on Square, ala Stripe subscriptions. However, I am having trouble retrieving a customer's card information (specifically customer_card_id) to pass into Charge.
Our flow is such:
A customer visits to our store and subscribes to a membership, which we process via the point of sale app.
We continuously poll Square to retrieve payment information, and create membership records appropriately.
When the user's membership period expires, charge them for the next month's membership.
When researching RetrieveCustomer, I find that there is a cards property under Customer, but iterating through all the Customers under our account, they all have cards = None despite us having taken card payments via the point of sale app.
Also, looking at ListTransactions, there doesn't seem to be anything that might be customer_card_id. The IDs I see there are tender ID, location ID, and transaction ID. The card_fingerprint also looks promising but that doesn't seem right either, since a card can have both an ID and a fingerprint.
Am I missing something? Where might I find customer_card_id?
EDIT
Looks like I was dumb and my local instance of our application was just out of date with transactions from Square. After updating my data with customers we've processed since the last time I updated, customers with a non-None card property now show up. tristansokol's answer below is still valid however.
How do you process the first charge? You need to explicitly add the card on file, it won't be added by default from processing a transaction from a customer. See: https://squareup.com/help/us/en/article/5770-use-card-on-file-with-the-square-point-of-sale-app

Getting User Email For Old Users On Yammer

I am trying to get historical data for all of our Yammer posts. We are very active, and like to look back sometimes. The data is loaded into a data warehouse.
For current messages, I get a list of users and then match messages against the user list. I can then use the email address as a unique identifier for the user (our users likes to change their names on the network to goofy names, or to someone else's name) to match it up with the rest of the user information we have for them.
The problem is that I when I start going back in time with the messages, the only information I get about a user is the ID and the username for users that are suspended or deleted. I can't seem to establish a way to match the username against a person. Some of the usernames contain periods (firstname.lastname), and other don't.
Is there any way to get the email address of the suspended/deleted user?

How to delete the person's records, after delete the app? Is there a way?

For example, one of the users creates random records, which are uploaded to public database in CloudKit, and some point, this person deletes the app, but his/her records are still existing. Because its a public database it counts against the free limits, so i should take care about it. Any ideas please?
It's not possible to detect if a user removed the app from his phone or if he is just not using the app. What you could do is selecting all users with no activity in that past X months and if there is no recent activity, then delete these users. As you probably do not want to start this delete action from a random iPhone, you could create an OS X app that is connected to the same data container.
You could create a CKQuery for searching a recordID like this:
var query = CKQuery(recordType: recordType, predicate: NSPredicate(format: "%K == %#", "creatorUserRecordID" ,CKReference(recordID: theSearchRecordId, action: CKReferenceAction.None)))
Where theSearchRecordId is the recordID.recordName that you are looking for. And you have to do this for each recordType that you have in your container. You do have to set the creatorUserRecorID field searchable in the CloudKit dashboard

MVC3 User Authentication link

In my application I have an administrator who can create Tournament objects. When the object is created the service also creates a user (based on the tournament director's info which was entered at creation). The username for the user is the director's e-mail, the password is randomly generated and then mailed to the director.
When the director logs on with his e-mail address and password, I need to be able to link him to his own tournament, in order to only allow him to edit his own tournament's details. I have tried to find a way to store the TournamentId in the default ASP Net Users database, but was unsuccessful.
I had a look at this SO question which would certainly help me, but I can't figure out how it would apply to my problem. When the user logs on, I can't put the TournamentId in the userdata seeing as I don't know it.
Should I then do a lookup in the Tournament table to see which ID corresponds to the email address entered at login and store that in the userData? It seems quite unelegant this way.
I guess you should have a CreatedBy column in your Tournament table where you store the ID of the user who created the tournament. Then when the user logged in, get his id ( may be from session ,if you store it there), Do a select query where CreatedBy=loggedInUserId .That should do the trick.

Resources