04-29-2017, 02:00 PM
Hello,
Don't want your users to pick their own usernames? Assign it yourself using these modifications!
The information below will assign a username of:
-First Initial Last Name, e.g. barsenault
-If that username exists, First Name, Last Initial, e.g. brandina
-If that username exists, email address of user
First, duplicate your to usersc folder so you do not modify a CORE file.
Remove the around Line 70 and add the following haste after the value:
https://hastebin.com/ukojoqexut.php
Remove the validation for username around line 84, so instead of the first line after 83 being username, the first line should be If you try to validate a non-field, it will fail.
Change Line 177 from:To:
In remove the Username label and input.
I recommend modifying the confirmation email or success page to include the users username, or advise them of the format (I recommend telling the user their username because it might not be in the format you provide them if the first format fails).
Don't want your users to pick their own usernames? Assign it yourself using these modifications!
The information below will assign a username of:
-First Initial Last Name, e.g. barsenault
-If that username exists, First Name, Last Initial, e.g. brandina
-If that username exists, email address of user
First, duplicate your
Code:
join.php
Remove the
Code:
$username = Input::get('username');
Code:
$email
https://hastebin.com/ukojoqexut.php
Remove the validation for username around line 84, so instead of the first line after 83 being username, the first line should be
Code:
'fname' => array(
Change Line 177 from:
Code:
'username' => Input::get('username'),
Code:
'username' => $username,
In
Code:
users/views/_join.php
I recommend modifying the confirmation email or success page to include the users username, or advise them of the format (I recommend telling the user their username because it might not be in the format you provide them if the first format fails).