Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to delete a meta data entry in OrmAuth?
  • I am using the OrmAuth.  I am storing some temporary meta data attached to a user by passing it along in the update_users() $value parameter.  Once I no longer need this meta data how do I go about unsetting it so it is deleted from the database (users_metadata table) entirely? I don't want to leave a blank value in the database, I want the row removed entirely for that meta entry.  I couldn't find anything in the docs on how to do this unless I'm missing something obvious.  Thanks!
  • HarroHarro
    Accepted Answer
    In Ormauth, metadata is implemented as an EAV container.

    With a model, you can simply use unset($model->property) to remove a related object, a custom property or an EAV property.

    With update_user(), you have to pass NULL as the value of the EAV property to have it unset().

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion