User can change his timezone
This commit is contained in:
@@ -245,17 +245,17 @@ class User
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
if($this->password=='') {
|
||||
$query = "UPDATE users SET version = $1, name = $2, is_avatar_present = $3, locale = $4, rank = $5, email = $6, website = $7 WHERE id = $8";
|
||||
$query = "UPDATE users SET version = $1, name = $2, is_avatar_present = $3, locale = $4, rank = $5, email = $6, website = $7, timezone = $8 WHERE id = $9";
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
pg_execute($con, "prepare1", array($this->version, $this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->id))
|
||||
pg_execute($con, "prepare1", array($this->version, $this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->timezone, $this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
}
|
||||
else {
|
||||
$query = "UPDATE users SET name = $1, is_avatar_present = $2, locale = $3, rank = $4, email = $5, website = $6, password = $7 WHERE id = $8";
|
||||
$query = "UPDATE users SET name = $1, is_avatar_present = $2, locale = $3, rank = $4, email = $5, website = $6, password = $7, timezone = $8, version = $9 WHERE id = $10";
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
pg_execute($con, "prepare1", array($this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->password, $this->id))
|
||||
pg_execute($con, "prepare1", array($this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->password, $this->timezone, $this->version, $this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user