Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.4 compatibility #12

Open
joraff opened this issue Apr 23, 2014 · 0 comments
Open

PHP 5.4 compatibility #12

joraff opened this issue Apr 23, 2014 · 0 comments

Comments

@joraff
Copy link

joraff commented Apr 23, 2014

I have a fork of this plugin in use at our university, and an upgrade to php 5.5 was causing the passwords not to be set for new users by the check_passwords callback. PHP 5.4 deprecated call-time pass-by-reference, and reference call must now be in the function definition.

I've modified my fork too much for a pull request, but just adding reference flags for $pass1 and $pass2 was enough.

function check_passwords( $user, &$pass1, &$pass2 ) {
    $random_password = substr( md5( uniqid( microtime( ))), 0, 8 );
    $pass1=$pass2=$random_password;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant