aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php5
-rw-r--r--engine/lib/users.php4
2 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 52ed40f8b..db3665c6f 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -385,8 +385,9 @@
* Save generic attributes to the entities table.
*/
public function save()
- {
- if ($this->guid != "" && $this->guid > 0)
+ {
+ $guid = (int) $this->guid;
+ if ($guid > 0)
{
return update_entity(
$this->get('guid'),
diff --git a/engine/lib/users.php b/engine/lib/users.php
index ed73e7405..76d5cac00 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -347,8 +347,8 @@
{
// Exists and you have access to it
- $result = update_data("UPDATE {$CONFIG->dbprefix}users_entity set name='$name', username='$username', password='$password', email='$email', language='$language', code='$code' where guid=$guid");
- if ($result!=false)
+ $result = update_data("UPDATE {$CONFIG->dbprefix}users_entity set name='$name', username='$username', password='$password', email='$email', language='$language', code='$code', last_action = ". time() ." where guid = {$guid}");
+ if ($result != false)
{
// Update succeeded, continue
$entity = get_entity($guid);