Closed thatcoolguy closed 2 years ago
The last parameter passed to Auth#register
is the complete closure or anonymous function
function ($selector, $token) { /* ... */ }
so remove that whole function here. It would then be something like this:
$userId = $auth->register($_POST['email'], $_POST['password'], $_POST['username']);
Does that help?
@ocram Hey Marco,
thank you for the help, I believe that's the first thing I tried yesterday but it wasn't working for some reason, probably I have another error. Well, it's so well documented and sometimes all we need is a little bit of rest I guess. Thank you, you can mark this as solved!
Thanks, no problem. I’ve improved the README to clarify which parameter it is referring to: https://github.com/delight-im/PHP-Auth/commit/79cc24931811f01a207cf0eb36b71cb84c71390b
"If you don’t want to perform email verification, just omit the last parameter to Auth#register. The new user will be active immediately, then."
What is that supposed to mean? I tried stripping $token, both (token and selector) and it still verified->0
how can I disable the verification?