RSS Feed/News Cant pass additional extraData to user spam checker from user registration service

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
27,114
Points
823

Reputation:

PHP:

Code:
public function checkForSpam()
{
    $user = $this->user;

$userChecker = $this->app->spam()->userChecker();
    $userChecker->check($user, ['preRegActionKey' => $this->preRegActionKey]);

As can be seen, $extraData is kinda hardcoded which makes it somewaht difficult to pass additonal data to user checkers without overwriting the whole method.

Could this be changed to smth. like
PHP:

Code:
protected function getSpamCheckExtraData(): array
{
    return ['preRegActionKey' =>...

Read more

Continue reading...
 
Status
Not open for further replies.
Top