Forums / Developer / Change class type of users?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Change class type of users?

Author Message

Marco Rogers

Monday 15 November 2010 2:10:10 pm

The users in my database are one of 2 class types. The default User or a new Visitor class that we originally created for a different feature. We have scrapped that feature and would now like to convert all Visitor Objects to User objects. What's the easiest way to do this. I would like to avoid doing a migration in PHP.

Can I change the class identifier in the database? Will that work properly or will this put the objects into an inconsistent state?

FYI, the attributes are mirrored between the two classes so as long as the attributes are still attached after the transition, I shouldn't need to mess with those. I'm only concerned about switching the class type of the user content object.

Thanks

:Marco

Heath

Monday 15 November 2010 9:34:55 pm

Hello Marco,

I seem to remember an older contribution that provide this functionality.

I found it! http://projects.ez.no/object_content_class_change

I see it has not been updated in a long time though.

It would be nice if it could be updated for use with Exponential 4.x/4.4

Cheers,

Heath

7x | https://se7enx.com/
Brookins Consulting | https://brookinsconsulting.com/
Certified | http://web.archive.org/web/201012...th.ez.no/certification/verify/380350
Solutions | https://projects.exponential.earth/users/community/brookins-consulting
eZpedia community documentation project | http://ezpedia.se7enx.com

paul bolger

Wednesday 17 November 2010 10:31:37 pm

I used object_content_class_change on a site a couple of years ago and it worked really well, not sure about now. I'd definitely not use it on a live site though...

That sort of functionality really should be in the core of eZ.

Paul Bolger