Skip to main content

Home/ Drupal for Developers/ Group items matching "token" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
Daniel Gregoire

20 APIs in 20 Days: Remember to Bring Your Tokens | Trellon - 3 views

  •  
    One of a series in 20 api's, Token module.
webExplorations

Securing Drupal User Accounts | Mad Irish . net - 0 views

  • This helps to limit automated account creation attempts (by bots). This configuration can be accessed via the main Drupal navigation menu following the links for Administer -> User settings.
  • On the 'User settings' page you'll notice that some of the content of the e-mail templates are tokenized, including place holders such as "!username" and "!password." These tokens are replaced with user specific values before e-mails are sent. It is important to remove any occurrence of "!password" token to prevent user passwords being sent via e-mail. Without the password users must utilize a time sensitive link in order to activate their account or change their password.
  • You can install and utilize the Password Strength module (http://drupal.org/project/password_strength) in order to require that users select strong passwords
  • ...1 more annotation...
  • Another great module for protecting user accounts is the Login Security module (http://drupal.org/project/login_security). This module detects brute force, or automated password guessing, attacks and can prevent them by notifying administrators and locking accounts for a time.
  •  
    Several steps you can take to stop bots from spamming your client's site. It is no fun spending an afternoon deleting hundreds of SPAM comments.
Scott Blackburn

Token - 0 views

Daniel Gregoire

Theming the User Registration Form in Drupal 6 | Trellon - 0 views

  • <?phpfunction themename_theme($existing, $type, $theme, $path) {  return array(    ...    // tell Drupal what template to use for the user register form    'user_register' => array(      'arguments' => array('form' => NULL),      'template' => 'user-register', // this is the name of the template    ),    ...  );}?>
  • <div id="registration_form">  <div class="field">    <?php      print drupal_render($form['account']['name']); // prints the username field    ?>  </div>  <div class="field">    <?php      print drupal_render($form['account']['pass']); // print the password field    ?>  </div>  <div class="field">    <?php        print drupal_render($form['submit']); // print the submit button      ?>    </div>  </div></div>
  • <?php  print '<pre>';  print var_export($form);  print '</pre>';?>
  • ...3 more annotations...
  • Don't forget to render hidden fields or it won't work ;) echo drupal_render($form['timezone']); echo drupal_render($form['form_build_id']); echo drupal_render($form['form_id']);
  • you also have to print the "token" in order to make the form work print drupal_render($form['form_token']);
  • From my own experience using a form tpl.php, you need to print the whole $form at the very end of the template to ensure that the form will validate upon submission. <?php print drupal_render($form); ?> Just adding the hidden form_build_id and the form_id fields will not mean the form will work. Printing the entire form at the end, however, will mean that all the stuff you wanted to hide in making the template will show. For those fields, include "unset" statements for each one: <?php unset($form['field_to_hide']); ?> Please correct me if I'm wrong or if there is a better way to do this.
1 - 5 of 5
Showing 20 items per page