View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] How to access classes from foreign script - ProjeQtOr

Prochaines Sessions

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)
 

13 mai 2025 (10h30-12h)

5 juin 2025 (16h-17h30)

 
 

Planifiez avec ProjeQtOr

14 et 15 mai 2025 (9h-12h30)

18 et 19 juin 2025 (9h-12h30)

 
 

Administrez avec ProjeQtOr

20 et 21 mai (9h-12h30)

25 et 26 juin (9h-12h30)

 

 

 

[SOLVED] How to access classes from foreign script

More
17 Mar 2021 17:05 #1 by Baryhobal
Hello,
Working on creating tickets via a telegram bot, I need to fetch some data from the database so I use the API. This is all good but it's a bit slow since it has to make several requests. I was thinking about making the script act as a real user and directly connect to projeqtor so it can have access to all the classes and functions. However, even after looking around some files, I'm still not sure how the login is handled.
Is it possible to simulate real user login via a script (located in tool directory) and if yes, how ?

Please Connexion or Create an account to join the conversation.

More
17 Mar 2021 17:51 #2 by Baryhobal
A bit more precision,
The script is in tool/ but is called via a POST request from nodered so it doesn't have direct access to the classes and functions

Please Connexion or Create an account to join the conversation.

More
18 Mar 2021 11:00 #3 by babynus
So you will have access as client, and cannot simulaite connected user on server side...
ProjeQtOr uses PHP Session (using cookies) to identify connexion.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
18 Mar 2021 12:34 #4 by Baryhobal
but wouldn't it be possible to create a new session as if it was my first visit on the page ? And I could save the PHP_SESSID to reuse the same session

Please Connexion or Create an account to join the conversation.

More
18 Mar 2021 14:27 #5 by babynus
We do not manage this.
PHP does.
I'm not sure, for security reason, you can find a workaroud

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
18 Mar 2021 21:16 #6 by Baryhobal
Nevermind, I got it working by copying what the API does. Thx for replying

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.045 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.