I have created an ajax controller (on sessions module) with static data to set the login session for a user. If i go to this controller with browser (link: http: // localhost: 8888 / index.php / sessions / ajax / setsession) works and the session works correctly: the user is logged on invoiceplane.
You can’t use file_get_contents or similar stuff to pass a session to a user.
Why using a controller to set static session data for a user? Makes no sense to me. Maybe you should explain what you want to do so we can help you with your idea…
i must call the login controller to able the user’s login with another file php.
So i have a web form and with php i must enable login session into InvoicePlane.
So i have create this ajax controller.
I do not think that this is possible with the current codebase InvoicePlane offers. You would have to extend the app with both an API that handles external user logins and a session handler that allows external authentications based on methods that would need to be discussed about in regards of security.
Because using curl inside a PHP file will make your PHP file become the user, not the browser that opens the PHP file.
This is not a problem with cookies (which are not used anymore). It is not a problem at all because that’s how the architecture works.
InvoicePlane does not support what you want to do yet.