Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -35,6 +35,7 @@ |
36 | 36 | 'id' => 'mw-emailuser-recipient', |
37 | 37 | ), |
38 | 38 | 'Target' => array( |
| 39 | + 'name' => 'wpTarget', |
39 | 40 | 'type' => 'hidden', |
40 | 41 | 'default' => $this->mTargetObj->getName(), |
41 | 42 | ), |
— | — | @@ -133,14 +134,8 @@ |
134 | 135 | wfDebug( "Target is empty.\n" ); |
135 | 136 | return 'notarget'; |
136 | 137 | } |
137 | | - |
138 | | - $nt = Title::newFromURL( $target ); |
139 | | - if ( !$nt instanceof Title ) { |
140 | | - wfDebug( "Target is invalid title.\n" ); |
141 | | - return 'notarget'; |
142 | | - } |
143 | | - |
144 | | - $nu = User::newFromName( $nt->getText() ); |
| 138 | + |
| 139 | + $nu = User::newFromName( $target ); |
145 | 140 | if( !$nu instanceof User || !$nu->getId() ) { |
146 | 141 | wfDebug( "Target is invalid user.\n" ); |
147 | 142 | return 'notarget'; |