mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
Formatting, and merged expires field into sql
This commit is contained in:
parent
99ff1cb575
commit
cee6081e38
@ -45,17 +45,18 @@
|
||||
$this->db->query("select * from phpgw_accounts where account_id='" . $this->account_id . "'",__LINE__,__FILE__);
|
||||
$this->db->next_record();
|
||||
|
||||
$this->data["userid"] = $this->db->f("account_lid");
|
||||
$this->data["account_id"] = $this->db->f("account_id");
|
||||
$this->data["account_lid"] = $this->db->f("account_lid");
|
||||
$this->data["firstname"] = $this->db->f("account_firstname");
|
||||
$this->data["lastname"] = $this->db->f("account_lastname");
|
||||
$this->data["fullname"] = $this->db->f("account_firstname")." ".$this->db->f("account_lastname");
|
||||
$this->data["lastlogin"] = $this->db->f("account_lastlogin");
|
||||
$this->data["lastloginfrom"] = $this->db->f("account_lastloginfrom");
|
||||
$this->data["lastpasswd_change"] = $this->db->f("account_lastpwd_change");
|
||||
$this->data["account_type"] = $this->db->f("account_type");
|
||||
$this->data["status"] = $this->db->f("account_status");
|
||||
$this->data['userid'] = $this->db->f('account_lid');
|
||||
$this->data['account_id'] = $this->db->f('account_id');
|
||||
$this->data['account_lid'] = $this->db->f('account_lid');
|
||||
$this->data['firstname'] = $this->db->f('account_firstname');
|
||||
$this->data['lastname'] = $this->db->f('account_lastname');
|
||||
$this->data['fullname'] = $this->db->f('account_firstname').' '.$this->db->f('account_lastname');
|
||||
$this->data['lastlogin'] = $this->db->f('account_lastlogin');
|
||||
$this->data['lastloginfrom'] = $this->db->f('account_lastloginfrom');
|
||||
$this->data['lastpasswd_change'] = $this->db->f('account_lastpwd_change');
|
||||
$this->data['account_type'] = $this->db->f('account_type');
|
||||
$this->data['status'] = $this->db->f('account_status');
|
||||
$this->data['expires'] = $this->db->f('account_expires');
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
@ -63,11 +64,12 @@
|
||||
{
|
||||
$this->db->query("update phpgw_accounts set account_lid='" . $this->data["account_lid"]
|
||||
. "', account_firstname='" . $this->data['firstname']
|
||||
. "', account_lastname='" . $this->data['lastname']
|
||||
. "', account_status='" . $this->data['status']
|
||||
. "' where account_id='" . $this->account_id . "'",__LINE__,__FILE__);
|
||||
. "', account_lastname='" . $this->data['lastname'] . "', account_status='"
|
||||
. $this->data['status'] . "', account_expires='" . $this->data['expires'] . "' where account_id='"
|
||||
. $this->account_id . "'",__LINE__,__FILE__);
|
||||
}
|
||||
|
||||
|
||||
function delete($accountid = '')
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
@ -138,19 +140,19 @@
|
||||
{
|
||||
$whereclause .= ' ) ';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$sql = "select * from phpgw_accounts $whereclause $orderclause $limitclause";
|
||||
$this->db->query($sql,__LINE__,__FILE__);
|
||||
while ($this->db->next_record()) {
|
||||
$accounts[] = Array(
|
||||
"account_id" => $this->db->f("account_id"),
|
||||
"account_lid" => $this->db->f("account_lid"),
|
||||
"account_type" => $this->db->f("account_type"),
|
||||
"account_firstname" => $this->db->f("account_firstname"),
|
||||
"account_lastname" => $this->db->f("account_lastname"),
|
||||
"account_status" => $this->db->f("account_status")
|
||||
'account_id' => $this->db->f('account_id'),
|
||||
'account_lid' => $this->db->f('account_lid'),
|
||||
'account_type' => $this->db->f('account_type'),
|
||||
'account_firstname' => $this->db->f('account_firstname'),
|
||||
'account_lastname' => $this->db->f('account_lastname'),
|
||||
'account_status' => $this->db->f('account_status',
|
||||
'account_expires' => $this->db->f('account_expires')
|
||||
);
|
||||
}
|
||||
return $accounts;
|
||||
@ -161,10 +163,13 @@
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
$this->db->query("SELECT account_id FROM phpgw_accounts WHERE account_lid='".$account_lid."'",__LINE__,__FILE__);
|
||||
if($this->db->num_rows()) {
|
||||
if($this->db->num_rows())
|
||||
{
|
||||
$this->db->next_record();
|
||||
return $this->db->f('account_id');
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
return False;
|
||||
}
|
||||
}
|
||||
@ -174,10 +179,13 @@
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
$this->db->query("SELECT account_lid FROM phpgw_accounts WHERE account_id='".$account_id."'",__LINE__,__FILE__);
|
||||
if($this->db->num_rows()) {
|
||||
if($this->db->num_rows())
|
||||
{
|
||||
$this->db->next_record();
|
||||
return $this->db->f('account_lid');
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
return False;
|
||||
}
|
||||
}
|
||||
@ -188,10 +196,13 @@
|
||||
|
||||
$account_id = get_account_id($accountid);
|
||||
$this->db->query("SELECT account_type FROM phpgw_accounts WHERE account_id='".$account_id."'",__LINE__,__FILE__);
|
||||
if ($this->db->num_rows()) {
|
||||
if ($this->db->num_rows())
|
||||
{
|
||||
$this->db->next_record();
|
||||
return $this->db->f('account_type');
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return False;
|
||||
}
|
||||
}
|
||||
@ -210,6 +221,8 @@
|
||||
return $this->db->f(0) > 0;
|
||||
}
|
||||
|
||||
// !! NOTE: We should pass an array to this to make updates easier, plus I need to add account_expires
|
||||
// I didn't want to risk breaking too much code at once, I will do this soon. (jengo)
|
||||
function create($account_type, $account_lid, $account_pwd, $account_firstname, $account_lastname, $account_status, $account_id='', $account_home='',$account_shell='')
|
||||
{
|
||||
//echo '<br>in create for account_lid: "'.$account_lid.'"';
|
||||
|
Loading…
Reference in New Issue
Block a user