aboutsummaryrefslogtreecommitdiff
path: root/install/ElggInstaller.php
diff options
context:
space:
mode:
Diffstat (limited to 'install/ElggInstaller.php')
-rw-r--r--install/ElggInstaller.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index 934b38d28..775bbf5b6 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -1519,22 +1519,27 @@ class ElggInstaller {
protected function createAdminAccount($submissionVars, $login = FALSE) {
global $CONFIG;
- $guid = register_user(
- $submissionVars['username'],
- $submissionVars['password1'],
- $submissionVars['displayname'],
- $submissionVars['email']
- );
+ try {
+ $guid = register_user(
+ $submissionVars['username'],
+ $submissionVars['password1'],
+ $submissionVars['displayname'],
+ $submissionVars['email']
+ );
+ } catch (Exception $e) {
+ register_error($e->getMessage());
+ return false;
+ }
if (!$guid) {
register_error(elgg_echo('install:admin:cannot_create'));
- return FALSE;
+ return false;
}
$user = get_entity($guid);
if (!$user) {
register_error(elgg_echo('install:error:loadadmin'));
- return FALSE;
+ return false;
}
elgg_set_ignore_access(TRUE);
@@ -1543,7 +1548,7 @@ class ElggInstaller {
} else {
datalist_set('admin_registered', 1);
}
- elgg_set_ignore_access(FALSE);
+ elgg_set_ignore_access(false);
// add validation data to satisfy user validation plugins
create_metadata($guid, 'validated', TRUE, '', 0, ACCESS_PUBLIC);