summaryrefslogtreecommitdiff
path: root/app/Model/User.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-22 18:49:34 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-22 18:49:34 -0500
commitc49d46718a07afeea017aa90a60320587211dc49 (patch)
tree68499594b8d2f6a26411249aaff12b87b4ee3628 /app/Model/User.php
parent77e10d25829f3523a168bf61424fac99a539f8be (diff)
Some refactoring for PHP 5.3
Diffstat (limited to 'app/Model/User.php')
-rw-r--r--app/Model/User.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/app/Model/User.php b/app/Model/User.php
index 3dd5993d..59015087 100644
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -260,15 +260,7 @@ class User extends Base
public function create(array $values)
{
$this->prepare($values);
-
- return $this->db->transaction(function($db) use ($values) {
-
- if (! $db->table(User::TABLE)->save($values)) {
- return false;
- }
-
- return (int) $db->getConnection()->getLastId();
- });
+ return $this->persist(self::TABLE, $values);
}
/**