When editing a user, an error message is given:

Deprecated function: Function ereg() is deprecated in logintoboggan_validate_pass() (line 1063 of ... \sites\all\modules\logintoboggan\logintoboggan.module).

Not sure if the pattern can be literally changed to a preg pattern.

Using Drupal 7 Alpha 5.

Files: 

Comments

Title:Warning saving user profileWarning when saving user profile

please confirm if you are using php5.3+ . seems like it is the cause of the deprecated warning.

Status:Active» Postponed (maintainer needs more info)

Status:Postponed (maintainer needs more info)» Active

Yes, indeed.

I'm running PHP 5.3.1.

Status:Active» Closed (won't fix)

Please downgrade php to 5.2.x. Read this for more information http://drupal.org/requirements

Priority:Normal» Minor
Status:Closed (won't fix)» Active

actually, i think we'll need to support PHP 5.3 for the 7.x version...

in any case, a deprecation warning is not critical -- things should function just fine.

Priority:Minor» Normal

ok, I just came across this http://drupal.org/node/360605 which show an work in progress patch for php5.3 compatibility.

Status:Active» Needs review
StatusFileSize
new983 bytes

according to http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-ph... attached patch should fix the issue. any regex wizards want to confirm my work before i commit?

Status:Needs review» Needs work

I just tried the patch, it seems to be working.
wondering if those two preg_match statements may be combined into one (line 1063-1064, logintoboggn.module).

i didn't originally write that section of code. if they can be combined, feel free to combine them and submit a patch :)

Status:Needs work» Needs review
StatusFileSize
new998 bytes

patch attached :)

Status:Needs review» Postponed (maintainer needs more info)

i'm a little bit confused about this latest patch. it doesn't appear to address the same character sequences, and the [:graph:] and space characters seem to be missing. have these somehow been incorporated into the new character sequence?

Status:Postponed (maintainer needs more info)» Needs review

Confirm patch makes the error go away on D7b2 & PHP5.3 with no apparent ill effects.

Status:Needs review» Postponed (maintainer needs more info)

@sudhirporwal: i need an answer to my question in #12 before i can proceed with this fix.

Status:Postponed (maintainer needs more info)» Needs review

[edited to make the explanation correct]
@hunmonk
while merging them into one preg sequence , I have aggregated everything into a +ve match, hence making [:graph:] character class unnecessary. The aggregated sequence only checks for the unnecessary charaters

To be honest , As per best of my knowledge this code works. I have tested the patch many times and can confirm that it does stop commonly used invalid characters in the passwords.

One unrelated question, even though I am member of the project, how come I don't get email notifications when an issue gets a reply. Please help me with this, as I assume I am doing something very silly here.

the [:graph:] character class does include the valid characters, so we need not to check for its inclusion

Title:Warning when saving user profileereg deprecated in PHP 5.3, remove from password checking function
Status:Needs review» Fixed

committed to HEAD, 6.x-1.x-dev, and 5.x-1.x-dev -- thanks!

@sudhirporwal: for issue emails, check your subscription settings for the project at http://drupal.org/project/issues/subscribe-mail/logintoboggan

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.