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

Comments
to answer my own question -
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);
}