Skip to content

Commit

Permalink
verifyAccount() to public method
Browse files Browse the repository at this point in the history
changed verifyAccount() to public method
  • Loading branch information
cp6 committed Feb 24, 2021
1 parent bc6d3e2 commit 3980510
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected function sendVerifyEmail(): void
$mail->send();
}

protected function verifyAccount(string $key): bool
public function verifyAccount(string $key): bool
{
$select = $this->db->prepare("SELECT `uid` FROM `activate_keys` WHERE `key` = ? LIMIT 1;");
$select->execute([$key]);
Expand Down

1 comment on commit 3980510

@enterv0id
Copy link

@enterv0id enterv0id commented on 3980510 Feb 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing to public returns Error: Call to a member function outputString() on bool in /var/www/html/dashboard/activate.php:6

line 6 in activate.php
($verify) ? $verify->outputString("Account activated") : $verify->outputString("Key is invalid");

Now it removes the key for the registered uid from activate_keys in MySQL before returning the error when clicking activation link and activates the registration, only the return message function not working

Please sign in to comment.