SemanticMediaWiki / SemanticSignup

Allows adding additional fields to the user registration form, which get placed on the new users' user page, as well as stored semantically.
https://www.mediawiki.org/wiki/Extension:SemanticSignup
Other
6 stars 3 forks source link

Pipe entries from the standard registration form into properties #14

Open kghbln opened 9 years ago

kghbln commented 9 years ago

I think it will be a nice feature if the entries for user name, real name and e-mail could optionally be piped into properties to be saved on the user's page.

mwjames commented 9 years ago

For a quick getaway the following can be used in SpecialSemanticSignup::createUserPage:

        $this->formHandler->setSubmitState( true );
        $data_text = $this->formHandler->getTemplateText();

        $str_to_insert = '|Username=' . $this->mUserDataChecker->mUser->getName();
        $str_to_insert .= '|Email=' . $this->mUserDataChecker->mEmail;
        $data_text = substr_replace( $data_text, $str_to_insert, strpos( $data_text, '}}' ), 0 );