summaryrefslogtreecommitdiff
path: root/app/User.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2015-05-30 19:13:51 +0100
committerGreg Roach <fisharebest@gmail.com>2015-05-30 23:29:57 +0100
commitcbc1590a8c715aa2d88bd745610b899587bd9563 (patch)
tree8411c52737b981c7eff37ffcdd083902cb769141 /app/User.php
parentffd703ea1e658c7dcb5e5f1f9ef137a420f2d167 (diff)
downloadwebtrees-cbc1590a8c715aa2d88bd745610b899587bd9563.tar.gz
webtrees-cbc1590a8c715aa2d88bd745610b899587bd9563.tar.bz2
webtrees-cbc1590a8c715aa2d88bd745610b899587bd9563.zip
Code style
Diffstat (limited to 'app/User.php')
-rw-r--r--app/User.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/User.php b/app/User.php
index c635482775..224c62eef1 100644
--- a/app/User.php
+++ b/app/User.php
@@ -41,7 +41,7 @@ class User {
/**
* Find the user with a specified user_id.
*
- * @param integer|null $user_id
+ * @param int|null $user_id
*
* @return User|null
*/
@@ -89,7 +89,7 @@ class User {
" WHERE gedcom_id = :tree_id AND setting_name = 'gedcomid' AND setting_value = :xref"
)->execute(array(
'tree_id' => $individual->getTree()->getTreeId(),
- 'xref' => $individual->getXref()
+ 'xref' => $individual->getXref(),
))->fetchOne();
return self::find($user_id);
@@ -140,13 +140,14 @@ class User {
"INSERT INTO `##block` (`user_id`, `location`, `block_order`, `module_name`)" .
" SELECT :user_id , `location`, `block_order`, `module_name` FROM `##block` WHERE `user_id` = -1"
)->execute(array('user_id' => $user->getUserId()));
+
return $user;
}
/**
* Get a count of all users.
*
- * @return integer
+ * @return int
*/
public static function count() {
return (int) Database::prepare(
@@ -275,10 +276,9 @@ class User {
}
/** Validate a supplied password
- *
* @param string $password
*
- * @return boolean
+ * @return bool
*/
public function checkPassword($password) {
$password_hash = Database::prepare(
@@ -289,6 +289,7 @@ class User {
if (password_needs_rehash($password_hash, PASSWORD_DEFAULT)) {
$this->setPassword($password);
}
+
return true;
} else {
return false;