Exemple #1
0
 protected function _getUserByImei($imei)
 {
     $user = new manage_model_user();
     $user->load($imei, 'imei');
     if (!$user->getId()) {
         $user->setData('imei', $imei);
         $user->setData('role_id', manage_model_role::ROLE_AGENT);
         $user->setData('username', $imei);
         $user->setData('fullname', $imei);
         $user->setData('marker_color', '#ff0000');
         $user->save();
     }
     return $user->getId();
 }