Index: trunk/extensions/OpenID/README.OpenID-mediawiki-extension |
— | — | @@ -279,10 +279,14 @@ |
280 | 280 | defaults to true; when first-time logging in with OpenID, propose and |
281 | 281 | allow new account names from OpenID SREG data such as fullname or nickname |
282 | 282 | |
283 | | -* $wgOpenIDAllowManualUsername |
| 283 | +* $wgOpenIDAllowNewAccountname |
284 | 284 | defaults to true; when first-time logging in with OpenID, show option |
285 | | - to enter and to allow a manually chosen username |
| 285 | + to enter and to allow a manually chosen username for a new wiki account |
286 | 286 | |
| 287 | +* $wgOpenIDAllowExistingAccountSelection |
| 288 | + defaults to true; whether associating an existing account with OpenID is |
| 289 | + allowed |
| 290 | + |
287 | 291 | * $wgOpenIDAllowAutomaticUsername |
288 | 292 | defaults to true; when first-time logging in with OpenID, show option |
289 | 293 | to choose and to allow an automatically generated username |
— | — | @@ -349,6 +353,7 @@ |
350 | 354 | on other sites. |
351 | 355 | |
352 | 356 | Remark: |
| 357 | + |
353 | 358 | User page urls can (currently) only act as OpenID if the user page really |
354 | 359 | exists i.e. has content. The mere existence of a user account is (currently) |
355 | 360 | not sufficient. |
Index: trunk/extensions/OpenID/SpecialOpenIDLogin.body.php |
— | — | @@ -166,8 +166,8 @@ |
167 | 167 | * @param $messagekey String or null: message name to display at the top |
168 | 168 | */ |
169 | 169 | function chooseNameForm( $openid, $sreg, $ax, $messagekey = null ) { |
170 | | - global $wgOut, $wgOpenIDOnly, $wgAllowRealName, $wgUser; |
171 | | - global $wgOpenIDProposeUsernameFromSREG, $wgOpenIDAllowAutomaticUsername, $wgOpenIDAllowManualUsername; |
| 170 | + global $wgOut, $wgOpenIDAllowExistingAccountSelection, $wgAllowRealName, $wgUser; |
| 171 | + global $wgOpenIDProposeUsernameFromSREG, $wgOpenIDAllowAutomaticUsername, $wgOpenIDAllowNewAccountname; |
172 | 172 | |
173 | 173 | if ( $messagekey ) { |
174 | 174 | $wgOut->addWikiMsg( $messagekey ); |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | ); |
184 | 184 | $def = false; |
185 | 185 | |
186 | | - if ( !$wgOpenIDOnly ) { |
| 186 | + if ( $wgOpenIDAllowExistingAccountSelection ) { |
187 | 187 | # Let them attach it to an existing user |
188 | 188 | |
189 | 189 | # Grab the UserName in the cookie if it exists |
— | — | @@ -237,7 +237,7 @@ |
238 | 238 | Xml::closeElement( 'tr' ) . "\n" |
239 | 239 | ); |
240 | 240 | $def = true; |
241 | | - } // !$wgOpenIDOnly |
| 241 | + } // $wgOpenIDAllowExistingAccountSelection |
242 | 242 | |
243 | 243 | # These are only available if all visitors are allowed to create accounts |
244 | 244 | if ( $wgUser->isAllowed( 'createaccount' ) && !$wgUser->isBlockedFromCreateAccount() ) { |
— | — | @@ -311,7 +311,7 @@ |
312 | 312 | ); |
313 | 313 | } |
314 | 314 | |
315 | | - if ($wgOpenIDAllowManualUsername) { |
| 315 | + if ($wgOpenIDAllowNewAccountname) { |
316 | 316 | $wgOut->addHTML( |
317 | 317 | |
318 | 318 | Xml::openElement( 'tr' ) . |
— | — | @@ -663,7 +663,7 @@ |
664 | 664 | # ---------------------------- |
665 | 665 | |
666 | 666 | function getUserName( $openid, $sreg, $ax, $choice, $nameValue ) { |
667 | | - global $wgOpenIDAllowAutomaticUsername, $wgOpenIDAllowManualUsername, $wgOpenIDProposeUsernameFromSREG; |
| 667 | + global $wgOpenIDAllowAutomaticUsername, $wgOpenIDAllowNewAccountname, $wgOpenIDProposeUsernameFromSREG; |
668 | 668 | |
669 | 669 | switch ( $choice ) { |
670 | 670 | case 'nick': |
— | — | @@ -689,7 +689,7 @@ |
690 | 690 | if ($wgOpenIDAllowAutomaticUsername) return $this->automaticName( $sreg ); |
691 | 691 | break; |
692 | 692 | case 'manual': |
693 | | - if ($wgOpenIDAllowManualUsername) return $nameValue; |
| 693 | + if ($wgOpenIDAllowNewAccountname) return $nameValue; |
694 | 694 | default: |
695 | 695 | return null; |
696 | 696 | } |
Index: trunk/extensions/OpenID/OpenID.setup.php |
— | — | @@ -115,13 +115,18 @@ |
116 | 116 | */ |
117 | 117 | |
118 | 118 | /** |
119 | | - * when creating a new account or associating an existing account with OpenID: |
120 | | - * show users a text input field to enter an arbitrary username and a select |
121 | | - * box for it. |
| 119 | + * whether associating an existing account with OpenID is allowed: |
| 120 | + * show a wiki account username text input and password field |
122 | 121 | */ |
123 | | -$wgOpenIDAllowManualUsername = true; |
| 122 | +$wgOpenIDAllowExistingAccountSelection = true; |
124 | 123 | |
125 | 124 | /** |
| 125 | + * when creating a new account with OpenID: |
| 126 | + * show users a text input field to enter an arbitrary username |
| 127 | + */ |
| 128 | +$wgOpenIDAllowNewAccountname = true; |
| 129 | + |
| 130 | +/** |
126 | 131 | * when creating a new account or associating an existing account with OpenID: |
127 | 132 | * Use the username part left of "@" in an OpenID e-mail address as username |
128 | 133 | * for account creation, or log in - if no nickname is supplied in the OpenID |
— | — | @@ -144,14 +149,13 @@ |
145 | 150 | /** |
146 | 151 | * when creating a new account or associating an existing account with OpenID: |
147 | 152 | * propose and allow new account names from OpenID SREG data such as |
148 | | - * fullname or nickname |
| 153 | + * fullname or nickname (if such data is available) |
149 | 154 | */ |
150 | 155 | $wgOpenIDProposeUsernameFromSREG = true; |
151 | 156 | |
152 | 157 | /** |
153 | 158 | * when creating a new account or associating an existing account with OpenID: |
154 | 159 | * propose an auto-generated fixed unique username "OpenIDUser#" (#=1, 2, ..) |
155 | | - * and show a select box for it. |
156 | 160 | */ |
157 | 161 | $wgOpenIDAllowAutomaticUsername = true; |
158 | 162 | |