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:onUserBeforeSave event

Triggered by Users_User
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onUserBeforeSave(Users_User $user)
$user Users_User specifies the user being saved
Triggered before a user object is saved. You can use this event to prevent the changes from saving by throwing an exception in the event handler.
public function subscribeEvents()
{
  Backend::$events->addEvent('core:onUserBeforeSave', $this, 'before_save_user');
}

public function before_save_user ($user)
{
  if($user->id == 1)
    throw new Phpr_ApplicationException("This user cannot be edited.");
}