Conditions | 3 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | protected function execute(InputInterface $input, OutputInterface $output) |
||
29 | { |
||
30 | $email = $this->getOrAskForArgument($input, $output, 'email', 'Enter email address: '); |
||
31 | if (empty($email)) { |
||
32 | $output->writeln('<error>Please enter an email address.</error>'); |
||
33 | return; |
||
34 | } |
||
35 | |||
36 | /** @var Member $member */ |
||
37 | $member = Member::get()->filter('email', $email)->first(); |
||
38 | if (!$member) { |
||
39 | $output->writeln('<error>Member with email "' . $email . '" was not found.'); |
||
40 | return; |
||
41 | } |
||
42 | |||
43 | $member->LockedOutUntil = null; |
||
44 | $member->FailedLoginCount = 0; |
||
45 | $member->write(); |
||
46 | |||
47 | $output->writeln('Member <info>' . $email . '</info> unlocked.'); |
||
48 | } |
||
49 | } |
||
51 |