Example #1
0
 public static function addUser($data)
 {
     //Agregar manejo de errores
     $password = shell_exec("/usr/bin/np -p" . $data['token']);
     //hasheado PBKDF2
     $mqtt = new UserMqtt();
     $mqtt->dni = $data['dni'];
     $mqtt->password = $password;
     $mqtt->super = 0;
     $mqtt->save();
 }