Navigation

Pligg Support

Anybody know how to change the register password length limit? It is currently set to a minimum of 5 and I would like to change this plus maybe add in other criteria: numbers, letters, uppercase, lowercase.
Thanks
PAul

Possible Answers

    Mmmm, not exactly the answere I was looking, rather I wanted to know ehger in the numerous system files was the password length conntrolled. However i found it in register.php, line 123 has the following code

    if(strlen($password) < 5 ) { // if password is less than 5 characters

    $form_password_error[] = $main_smarty->get_config_vars('PLIGG_Visual_Register_Error_FiveCharPass');

    $error = true;

    This looks like the rigth place to me, chaning the 5 to a 10 should do the trick, adding further format restrictions should be fairly staright forward.

    Thanks

    Paul

    | Posted 351 days ago | Permalink | Hide Replies

    Not exactly the answer I was looking for, rather where in the numerous files I could find out where the limit is controlled. However, I found what I was looking for in register.php, around line 123 it has the following code:

    if(strlen($password) < 5 ) { // if password is less than 5 characters

    $form_password_error[] = $main_smarty->get_config_vars('PLIGG_Visual_Register_Error_FiveCharPass');

    $error = true;

    I'm guessing that changing the '5' to say 10 will do the trick.

    Thanks

    Paul

    | Posted 351 days ago | Permalink | Hide Replies

    Oh, yeah, if you do change just the length, don't forget to change the language file for the error. Else your users will see the current "Password Length" error which may confuse them if they already used 5 letters/numbers but the script requires more. They may give up instead of adding more characters.

    | Posted 350 days ago | Permalink | Hide Replies

    That will take care of New Registrations but not the old Users and Passwords.

    I was thinking about an across the board fix using the built-in Pligg 'hooks' (if they are there) with stuffing in the JavaScript if you find one. That would get you through upgrades of software and maybe template changes, too.

    Also, I was thinking you wanted more than just a length change..... A mix of caps, numbers, etc.

    | Posted 350 days ago | Permalink | Hide Replies

    Never gave this any thought but I bet there's a Javascript somewhere you could drop into the login template that would force a tougher Password according to your parameters and requirements.

    | Posted 351 days ago | Permalink | Hide Replies

Who Upvoted this Story

Pligg.com's Support area is where you can ask questions and get answers. Just getting started with the Support area? This section describes tips for participating.

Submitting a Question or Comment

By taking a minute to research previous posts you may receive an answer much faster than waiting for a response to a new question. Begin by searching the support section for an answer. Sometimes you may even want to extend your search to the entire pligg.com domain.

If you are unable to find a relevant answer, submit a new question or comment here. Please provide a detailed description and, when necessary, debugging information such as your server environment (a link to a <?php phypinfo(); ?> .php page would be very helpful), your web browser, and any steps necessary to reproduce your issue.

Submitting an Answer

If you have an answer or useful response that you would like to add to a post, you can submit it as a comment which other users will then vote on. Answers are sorted by most popular to least, allowing the best information to climb to the top of the page.

Please read and vote for existing answers before submitting your own, as there may already be an acceptable answer provided. You can use the "Reply" link found within an answer to submit a response to it, in case you want to expand or comment on someone else's contribution.

Including Files or Code

Sometimes it is necessary for you to attach a file or include a snippet of code for others to reference in your response. In most cases, you can .zip up files and attach them to a question or answer using Pligg's file manager. At times though this may fail, and in these circumstances we recommend using a third party host. Below we are including a list of recommended websites where you can share easily share file uploads (or snippets of code) through the web.