aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 59754fee6..c371a7db2 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -466,7 +466,7 @@
* @param string $email Their email address
* @return int|false The new user's GUID; false on failure
*/
- function register_user(string $username, string $password, string $name, string $email) {
+ function register_user($username, $password, $name, $email) {
// Load the configuration
global $CONFIG;
@@ -475,8 +475,9 @@
if (empty($username)
|| empty($password)
|| empty($name)
- || empty($email))
- return false;
+ || empty($email)) {
+ return false;
+ }
// Check to see if $username exists already
if ($user = get_user_by_username($username)) {
@@ -489,7 +490,10 @@
$user->password = md5($password);
$user->email = $email;
$user->name = $name;
- return $user->save();
+ $user->save();
+
+ return $user->getGUID();
+
}