| Conditions | 4 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function forgotPassword($member) { |
||
| 17 | if(Config::inst()->get('OpauthMemberLoginFormExtension', 'allow_password_reset')) { |
||
| 18 | return null; |
||
| 19 | } |
||
| 20 | |||
| 21 | $identity = OpauthIdentity::get()->find('MemberID', $member->ID); |
||
| 22 | if(!$member->Password && $identity) { |
||
| 23 | $this->owner->sessionMessage( |
||
| 24 | _t( |
||
| 25 | 'OpauthMemberLoginFormExtension.NoResetPassword', |
||
| 26 | 'Can\'t reset password for accounts registered through {provider}', |
||
| 27 | array('provider' => $identity->Provider) |
||
| 28 | ), |
||
| 29 | 'bad' |
||
| 30 | ); |
||
| 31 | return false; |
||
| 32 | } else { |
||
| 33 | return null; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.