You are here

function _auto_username_eval in Automatic User Names 7

Evaluate php code and pass $account to it.

1 call to _auto_username_eval()
_auto_username_patternprocessor in ./auto_username.module
Process an account and return its new username according to the current pattern.

File

./auto_username.module, line 110
Allows a user's username to be assigned based on tokens.

Code

function _auto_username_eval($code, $account) {
  ob_start();
  print eval('?>' . $code);
  $output = ob_get_contents();
  ob_end_clean();
  return $output;
}