Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ibexy on
I am using the code below to edit the user profile "signature" but am getting error:
EntityMetadataWrapperException: Unknown data property signature. in EntityStructureWrapper->getPropertyInfo()
The code is:
$chosen_text="signature text";
$obj_signature = user_load(14);
$obj = entity_metadata_wrapper('user', $obj_signature);
$obj->signature = $chosen_text;
$obj->save();
Comments
after searching I found this
after searching I found this code that runs without error but it does not store the signature text. Instead it stores the word "Array" into the signature field:
Then you probably want this:<
Then you probably want this:
Worked like magic! Thanks!
Worked like magic!
Thanks!
How can I extract the
How can I extract the signature into a string variable. I am using this code but its not working: