I use comments. Users are not required to register.

The result is then "usernaam (not verified)"

how do i delete (not verified)

.

 

Accepted answer

in  template.php of theme work this

 

 

function basis_preprocess_username(&$variables) {

  $account = $variables['account'];

  $variables['extra'] = '';

  if (empty($account->uid)) {

    $variables['uid'] = 0;

    $variables['extra'] = ' ';

  }

  else {

    $variables['uid'] = (int) $account->uid;

  }

    $name = $variables['name_raw'] = user_format_name($account);

  if (backdrop_strlen($name) > 20) {

    $name = backdrop_substr($name, 0, 15) . '...';

  }

  $variables['name'] = check_plain($name);

  $variables['profile_access'] = user_access('access user profiles');

}

Comments

bugfolder's picture

That text is added in template_preprocess_username(). You can override that by creating a module (e.g., mymodule) containing a function mymodule_preprocess_username that replicates that code, but eliminate the line that sets $variables['extra'] at the beginning of the function. Or, simpler, you could just call template_preprocess_username in your own function, then unset($variables['extra']).

i can override a template, but a mudole is new  for me

Quick additional comment: you can override template_preprocess_username() in the template.php file, in which case the function would be THEME_preprocess_username()

Or you could simply print the following:

print $account->name;

 

in  template.php of theme work this

 

 

function basis_preprocess_username(&$variables) {

  $account = $variables['account'];

  $variables['extra'] = '';

  if (empty($account->uid)) {

    $variables['uid'] = 0;

    $variables['extra'] = ' ';

  }

  else {

    $variables['uid'] = (int) $account->uid;

  }

    $name = $variables['name_raw'] = user_format_name($account);

  if (backdrop_strlen($name) > 20) {

    $name = backdrop_substr($name, 0, 15) . '...';

  }

  $variables['name'] = check_plain($name);

  $variables['profile_access'] = user_access('access user profiles');

}

bugfolder's picture

although "print check_plain($account->name);" would probably be safer (note that check_plain() is applied in theme_preprocess_username()).