Commit 812c1e21 authored by Penny Leach's avatar Penny Leach
Browse files

wrapper function for setting profile fields

parent 34530cf1
......@@ -159,4 +159,14 @@ function expected_account_preferences() {
);
}
function set_profile_field($userid, $field, $value) {
safe_require('artefact', 'internal');
$classname = generate_artefact_class_name($field);
$profile = new $classname();
$profile->set('owner', $userid);
$profile->set('title', $value);
$profile->commit();
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment