}
- if (isset( $_SESSION[get_class($this)][$sesPrefix .'-empty'] ) && $_SESSION[get_class($this)][$sesPrefix .'-empty'] < 1) {
+ if (
+ isset( $_SESSION[get_class($this)][$sesPrefix .'-empty'] ) &&
+ $_SESSION[get_class($this)][$sesPrefix .'-empty'] < 1
+ ) {
// fake person - open system..
//$ce = DB_DataObject::factory('core_enum');
// list all staff who are not in a group.
$this->whereAdd("{$this->tableName()}.id NOT IN (
SELECT distinct(user_id) FROM $tn_gm LEFT JOIN
- $tn_g ON $tn_g.id = $tn_gm.group_id
- WHERE $tn_g.type = ".$q['query']['type']."
- )");
-
+ $tn_g ON $tn_g.id = $tn_gm.group_id)");
} else {
$p = DB_DataObject::Factory('core_group_member');
$p->user_id = $this->id;
$mem = $p->fetchAll(); // fetch all the rows and set the $mem variable to the rows data, just like mysqli_fetch_assoc
-
- $e->logDeletedRecord($p);
-
+ $e->logDeletedRecord($mem);
+
foreach($mem as $p) {
$p->delete();
}
- $e = DB_DataObject::Factory('events');
+ $e = DB_DataObject::Factory('Events');
$e->person_id = $this->id;
$eve = $e->fetchAll(); // fetch all the rows and set the $mem variable to the rows data, just like mysqli_fetch_assoc
-
+
+ $e->logDeletedRecord($eve);
foreach($eve as $e) {
$e->delete();
}
-
// anything else?
}
}
$c->find(true);
$this->company_id = $c->id;
+ $this->email = trim($this->email);
}
foreach($result_add as $gid){
PDO_DataObject::Factory('core_group_member')->set(array(
'group_id'=> $gid,
- 'user_id' => $pid
+ 'user_id' => $q['id']
))->insert();
}
}
}
+ $this->email = trim($this->email);
}
function generateOathKey()