Closed marcelmastel closed 5 months ago
Yes, see documentation
On Wed, 6 Apr 2022 at 14:03, Marcello Mastellone @.***> wrote:
Hi, is possible load model user in a controller for manage email first name e last name in a view '/my-account/'?
— Reply to this email directly, view it on GitHub https://github.com/tombenner/wp-mvc/issues/259, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFJLZLHL2O5TWKHVJ4DUMLVDWDSNANCNFSM5SV6ZRUA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Sent from Gmail Mobile
I found this load_model.. but if I passed MvcUser.. Not works i have an issue
http://wpmvc.org/documentation/controllers/controller_methods/load_model.html
@marcelmastel try this instead.
$user_model = mvc_model('MvcUser'); $user = $user_model->find_by_id(1);
If you want to use the other way you need to do a mapping to a model in your Project say Member like in this link
https://wpmvc.org/documentation/wordpress_data_integration/models_for_wordpress_tables.html Good luck!
Hi, is possible load model user in a controller for manage email first name e last name in a view '/my-account/'?