Examples of "Execute custom PHP code"?

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by Alexander Ufimtsev on August 5, 2008 at 12:07pm

Hi All,

Are there any 'execute custom php code' examples available for workflow-ng v 2.1? I am trying to set 'alt_login' username upon user creation:

$alt_login = $account;
return array("alt_login" => $account);

but I guess that's too simplistic. Should I actually do it with SQL statements, etc? If so, are there any limitations on PHP execution via workflow-ng? Any code samples, etc?

Thanks in advance,
Alex

Categories: ,

Comments

to answer my own question -

Posted by Alexander Ufimtsev on August 5, 2008 at 12:39pm

to answer my own question - the following example sets user's alternate login:

$alt_login = $account->name;
if ($alt_login) {
db_query("INSERT INTO {alt_login} (uid, alt_login) VALUES (%d, '%s')", $account->uid, $alt_login);
}

Workflow

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /