This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

core:onExtendUserModel event

Triggered by Users_User
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onExtendUserModel(Users_User $user, string $context)
$user Users_User specifies the user object.
$context string specifies the execution context.
Allows to define new columns in the back-end user model. The event handler should accept two parameters - the user object and the form execution context string. To add new columns to the user model, call the define_column() method of the user object. Before you add new columns to the model, you should add them to the database (the users table).
public function subscribeEvents()
{
  Backend::$events->addEvent('core:onExtendUserModel', $this, 'extend_user_model');
  Backend::$events->addEvent('core:onExtendUserForm', $this, 'extend_user_form');
}

public function extend_user_model($order, $context)
{
  $order->define_column('x_gender', 'Gender');
}

public function extend_user_form($order, $context)
{
  $order->add_form_field('x_gender')->tab('Contacts');
}