aboutsummaryrefslogtreecommitdiff
path: root/lib/helpers.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helpers.php')
-rw-r--r--lib/helpers.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/helpers.php b/lib/helpers.php
index c7158235a..765fc0a61 100644
--- a/lib/helpers.php
+++ b/lib/helpers.php
@@ -43,7 +43,7 @@ function openid_client_prepare_registration_vars(array $data) {
if (isset($data['username'])) {
$vars['username'] = $data['username'];
} else if (isset($data['email'])) {
- $vars['username'] = array_pop(explode('@', $data['email']));
+ $vars['username'] = array_shift(explode('@', $data['email']));
} else {
$vars['username'] = null;
}