Jump to content

tszilassi

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation Activity

  1. Like
    tszilassi reacted to LukesUbuntu in Using The Current User's Data While Provisioning Service Through Module   
    From when they are logged in you could get the clients info , something like this in your addService
     
    Loader::loadModels($this,array("Clients"));
     
    #update checked the client model and you can do something like this obviously some checking of client_id etc... 
    $client = $this->Clients->get($vars['client_id'],false);

    $email = $client->email;
    $first_name = $client->first_name;
    $last_name = $client->last_name;
     
    //you may need to add something to check when addService is run from admin panel so your not passing the admin id im not sure check it out code is well documented its awesome.... 

    Anyway there maybe a better way of grabbing the clients details i haven't tested this as ive only just started doing modules for blesta last week so don't quote me on it but it is one way.... 
     
×
×
  • Create New...