Friday, 15 July 2011

Drupal 7 unset drupal_set_message -



Drupal 7 unset drupal_set_message -

in contributed module (ldap_sso.module) custom drupal_set_message beingness declared.

drupal_set_message(theme('ldap_authentication_message_not_authenticated', array('message' => t('you not authenticated server. may log in credentials below.') ) ), 'error');

how can override message or possible unset via custom module doesn't called @ when ldap sso authentication fails?

if @ code of drupal_set_message() @ https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupal_set_message/7, notice message gets set if $message parameter not null. if somehow set $message parameter null, no message set.

fortunately since ldap module using theme function, easy. define theme function in template.php file of theme using. suppose using theme called "mytheme". open template.php file in folder , add together next code:

/** * implements theme_ldap_authentication_message_not_authenticated(). */ function mytheme_ldap_authentication_message_not_authenticated(&$vars) { homecoming null; }

clear cache. theme('ldap_authentication_message_not_authenticated', …) phone call theme function have defined rather 1 defined ldap module. since theme functions returns null, message not set.

neerav mehta

drupal development in bay area

drupal drupal-7

No comments:

Post a Comment