Extension talk:Create User Page

Jump to navigation Jump to search

About this board

Extension is creating anonymous user pages (User:IP_number) when the wiki is accessed through the API

2
Emmanuel Touvier (talkcontribs)

Our internal wiki is supposed to be read only for anonymous, and the users are authenticating with our AD through SAML, so $wgCreateUserPage_OnLogin is set to false.

When I enable the extension on the wiki, existing user pages are created but also pages with the name : User:10.XXX.XXX.XXX (10.XXX.XXX.XXX is the IP address). I think they come from our enterprise search which is using the mediawiki API to get results.

How can I prevent the extension from creating such pages ?

Cindy.cicalese (talkcontribs)

Thank you for reporting that error. It is now fixed.

Reply to "Extension is creating anonymous user pages (User:IP_number) when the wiki is accessed through the API"

Edit attribution for newly created user page

4
Summary by Cindy.cicalese

Feature added in Version 2.0.

Kghbln (talkcontribs)

This extensions assigns the newly created user page to the user. I think it should be possible to set a specific user to whom the edit is attributed like it is possible for the NewUserMessage extension or other extension creating content automatically. I believe it should be possible to see that not the user created the page initially but a "bot". Thanks for considering this enhancement.

Cindy.cicalese (talkcontribs)

That sounds like a great enhancement. Could you please add a Phabricator task for it? I will try to get to it soon.

Kghbln (talkcontribs)

Now tracked with task T250010. Thanks a lot for considering.

Cindy.cicalese (talkcontribs)

Thank you! I have uploaded a patch. Once you have a chance to test, please give it a +1 if it's OK.

Does this work with SAML SSO Integration?

7
Summary by Cindy.cicalese

When using Extension:SimpleSamlAuth, you must set $wgCreateUserPage_OnLogin=false;

Revansx (talkcontribs)

Hi Cindy,

I just installed v1.2 (d36a151) of this extension on my meza deployed mw 1.31.1 (a4c8065) using SAML as the SSO and was surprised that it didn't work. I'm not a SAML export but I'm wondering if you can think of any reason why this wouldn't work out of the box with SAML-based SSO authentication.

/Rich

CCicalese (WMF) (talkcontribs)

If the SAML extension you are using does not support the UserLoginComplete hook, you would have the same problem that we discussed at Topic:U0mwtk3njfvf3moi. Did you try setting $wgCreateUserPage_OnLogin to false to see if that makes a difference?

Revansx (talkcontribs)

Trying now

Revansx (talkcontribs)

Yep. Setting $wgCreateUserPage_OnLogin=false; did the trick. Thanks!

Cindy.cicalese (talkcontribs)
Revansx (talkcontribs)

Yes. per Meza 31.8 to be exact. Does this mean that since SimpleSAMLphp supports the UserLoginComplete hook that something is wrong with my SimpleSAMLphp integration?

Cindy.cicalese (talkcontribs)

No. There are two different MediaWiki extensions that work with the PHP simpleSAMLphp library: Extension:SimpleSamlAuth and Extension:SimpleSAMLphp. The former is the one that you are using (which is included in meza), and it does not support the UserLoginComplete hook. The latter does support the UserLoginComplete hook.

How to make Create User Page behave like Semantic Signup ?

2
Emmanuel Touvier (talkcontribs)

The Semantic Signup extension is no more maintained, I think this one could replace it. But in order to do this, the extension should be able to redirect the user to the page newly created, with an "action=formedit".

Do you think it is possible to implement this redirection in the extension ?

Cindy.cicalese (talkcontribs)

Interesting idea. That could potentially add quite a bit of complexity to this otherwise simple extension, increasing the maintenance burden. If a simple patch were proposed that did not introduce dependencies for those wanting the simple, non-redirecting behavior, I would consider it.

Reply to "How to make Create User Page behave like Semantic Signup ?"

existing user pages and existing user pages with subpages

8
Summary by Cindy.cicalese

Added $wgCreateUserPage_OnLogin

Revansx (talkcontribs)

Hi Cindy, the extension installed without issue, but it did not re-write/re-create my user page as I was thinking it would.

In my LocalSettings.php I have:

wfLoadExtension( 'CreateUserPage' );
$wgCreateUserPage_PageContent= "{{UserDetails|UserUsername=test1|UserDisplayName=test2|UserWorkEmail=test3|UserWorkOrgCode=test4}}";

I did a page refresh of my user page: no effect

I deleted my existing user page: no effect

My user page has subpages. Could that affect the way it works?

Here's my system:

Product Version
MediaWiki 1.28.2
PHP 5.6.31 (apache2handler)
MariaDB 5.5.56-MariaDB
ICU 50.1.2
Cindy.cicalese (talkcontribs)

I tested to be sure, and subpages do not prevent the user page from being created. Did you log out and log back in? The extension creates the users's user pages if it does not exist when the user logs in.

Cindy

Revansx (talkcontribs)

ok. hmm.. could it be because I am being auto-logged in with "Auth_remoteuser" extension that the "Create User Page" extension isn't being triggered?

Cindy.cicalese (talkcontribs)

Oh, yes, that's it. CreateUserPage relies upon the UserLoginComplete hook, which doesn't get invoked for Auth_remoteuser. I could add a flag that would optionally allow the check to be done on each page load.

Revansx (talkcontribs)

Please do!

Cindy.cicalese (talkcontribs)

I just released version 1.2 with a $wgCreateUserPage_OnLogin configuration variable. Set it to false to check for the user page on each page load rather than at login.

Revansx (talkcontribs)

Works great! You Rock, Cindy.. Thank you!!!

Cindy.cicalese (talkcontribs)

Excellent! You are very welcome!

creates dead pages for me

3
Summary by Cindy.cicalese

A patch was merged to fix the problem.

24.113.225.174 (talkcontribs)

Text placed on a user: page by this extension for me was not wikitext -- {{user}} was consequently not executable.

Cindy.cicalese (talkcontribs)

By default, the extension places an invocation of a template named "User" on the page (with the wikitext {{User}}). If you want to accept that default, you will need create page Template:User and populate it as you wish. Otherwise, you can use the $wgCreateUserPage_PageContent configuration variable to set the default text to whatever you want.

If you are seeing something other than {{User}} on the page by default, I will need more information (what extension and MediaWiki versions are you using, what is your configuration/environment, what *exactly* are you seeing) in order to diagnose the problem.

Cindy.cicalese (talkcontribs)

A patch was just merged that may fix this problem. There was a problem that only affected MediaWiki 1.29+.

There are no older topics