You are viewing limited content. For full access, please sign in.

Question

Question

Join login and username

asked on May 10, 2018

Good morning,

I'm trying to put together a workflow that will query the Forms' database and I found that under the table "cf_users" I can get the username. This is great because that's what I was looking for. I needed the username in that format to assign User Tasks to that particular person.

However, I need a way to get a unique identifier; I was thinking initially that I could use the email address from the same "cf_users" and query as GIVE ME THIS USERNAME WHERE EMAIL EQUALS THIS EMAIL, but I learned that a person can have more than one account with the same email address.

My next thought was to query it with something like this: GIVE ME THIS USERNAME WHERE LOGIN EQUALS LOGIN. 

Of courses I would need to join some other table, since the login does not seem to be in the "cf_users" table. 

Can anyone point me into the right direction on where to find this login table or if there is a better way to tackle this?

Thank you,

Raul Gonzalez

0 0

Replies

replied on May 10, 2018

What is your setup where you have multiple usernames pointing to the same email address? In almost all cases, you should have a separate email for each Forms account. Even if you have a system or admin account for a person who also has their own Forms account, you should have a system or admin mailbox for that account. 

If you are looking for a username by email, it should return the correct username to assign the task to. If you have multiple usernames that are returned by the same email, could you assign the task to multiple users and then claim the task by the user you wish to assign it to? 

Also, Username=Login, what did you mean by that query? 

0 0
replied on May 10, 2018

Thanks Jared,

Since the login account would be something unique, I was thinking to use it to query the username. 

Now by username I mean the username that Forms displays in a Form Field. Something like 

CN=someone,OU=Users,OU=somedept,OU=Campus,DC=somedomain,DC=NET

The above I can get, but I'm trying to run find a way so that I can return only one result.

With the email I get multiple results when people have the same email address for different accounts.

Not sure why the set up is like that though.

0 0
replied on May 10, 2018

Could you just return the first one? Does it matter which of a person's multiple accounts the user task is assigned to? 

0 0
replied on May 10, 2018

Let's say that one account has access to a Form and the other one does not. Now I need to keep track of which account they log in with at any point. If they log in with an account that does not have access to a particular form, I'm guessing that the form will gets suspended or something. Or they won't be able to  log in maybe.

That could work. I need to experiment with it I guess.

0 0
replied on May 10, 2018

This query eliminates some of the duplicates. It's still not perfect though.

SELECT is_activated, email, COUNT(*) FROM cf_users WHERE email <> '' and is_activated = 1 GROUP BY is_activated, email HAVING COUNT(*) > 1

 

0 0
replied on May 10, 2018

I learned form our admins that one of the accounts is LDAP and the other is Windows authentication. I need the one from LDAP. Is there a way to check this against, in the database?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.