APIAuthentication

Discussion for TimeTrex open source community developers.
Locked
agood
Posts: 2
Joined: Wed May 29, 2013 1:58 pm

APIAuthentication

Post by agood »

Hello,

I am working on developing a PHP page that automatically punches a user in/out when they post their timetrex ID.

To do so, I am logging in with the admin user and then attempting to switch to the posted user by calling switchUser( useridhere ), as shown in the clientAPIexample. However, I cannot seem to be able to give the admin user the permission to be able to do this.

I gave it all the permission available from the interface, and I am unable to find the permission field "login_other_user" anywhere in the database.

I did see a hack I could use on another discussion thread that would remove the necessity of giving the admin user this permission, but I want to avoid any modifications to the source code if at all possible. Any advice given would be greatly appreciated!
EricM
Posts: 30
Joined: Wed Jan 16, 2013 2:22 pm

Re: APIAuthentication

Post by EricM »

Unfortunately, I think the official solution is to pay for one of the fancier versions of TimeTrex.

So far my DIY solution is working well with the free version, we are doing several hundred barcode punches a day with my stand alone stations.
agood
Posts: 2
Joined: Wed May 29, 2013 1:58 pm

Re: APIAuthentication

Post by agood »

Thanks, EricM.
I wound up using your hack after all. Your DIY code was a big help getting me started on my page. It's an impressive piece of coding!
Locked