Fix #7123 - getting abra ready to test
[Pman.Xtuple] / TestAuth.php
1 <?php
2
3 require_once 'Pman.php';
4
5 class Pman_Xtuple_TestAuth extends Pman
6 {
7     static $cli_desc = "Test auth code...";
8     
9     function getAuth()
10     {
11         if (!HTML_FlexyFramework::get()->cli) {
12             die("not cli");
13         }
14     }
15     
16     function get()
17     {
18         $this->init();
19         DB_DataObject::DebugLevel(1);
20         $oc = $this->loadOwnerCompany();
21         
22         $p = DB_DataObject::factory('Person');
23         if ($p->get('email', 'test@roojs.com')) {
24             $p->delete();
25         }
26         
27         
28         $p = DB_DataObject::factory('Person');
29         
30         $p->setFrom(array(
31             'email' => 'test@roojs.com',
32             'name' => 'test',
33             'company_id' => $oc->id,
34             
35         ));
36         $p->setPassword("test123");
37         $p->insert();
38         $p->onInsert(array(),$this);
39         print_R($p);exit;
40          
41         //onUpdate($old, $request,$roo)
42     
43     
44    
45     }
46     
47     
48     
49 }