This question about Missing functionality: Answered

Set User by perlscript

Hi,

i am trying to write a perl plugin to update a topic from the unix command line. It works fine and changes the topic like it should but always as TwikiGuest user. So i got to set the user while my script is running. A call of $session->{loginManager}->login() dont change the user even the login works.

So i am trying to call the login plugin and store a session cookie. With curl it works fine cause curl stores a cookie which i can use running my script. But i cant use curl on the unix machine so i got to make the login in my script using the API.

I gibe the script a user an a password, i validate them that works. I can call login that works to. But when i call the save() method its alway the TwikiGuest account. How can i set the sessionuser to the username i put into the script?

Thanks
You can pass username and password to any script you call on the command line. So long as that user is a genuine registered user, their wikiname will be used in any save.

-- CrawfordCurrie - 06 Feb 2012

QuestionForm edit

Subject Missing functionality
Extension
Version TWikiRelease04x01x02
Status Answered
Related Topics
Topic revision: r2 - 06 Feb 2012, CrawfordCurrie - This page was cached on 22 Jun 2019 - 16:19.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy