Welcome to Geeklog, Anonymous Thursday, November 21 2024 @ 07:55 am EST
Geeklog Forums
How to add support for password sign-up (gl-2.1.0)
Status: offline
testaccount2
Forum User
Newbie
Registered: 05/27/15
Posts: 2
The following steps will disable sending the signup password by email, and allow users to enter their own password on signup.
public/layout/modern_curve/users/registrationform.thtml:
> Add password element to form:
> Also remove second email input.
<dd><input type="password" size="32" maxlength="96" name="passwd" value="{passwd}" id="registrationform-passwd" class="text"{xhtml}></dd>
public/users.php:
-Disable mail submission by faking result confirm @Ln:84
-Add $passwd variable to function createuser @Ln:197:
-Add $passwd variable to $uid var; @Ln:247
-Add label:@Ln:358
-Add to form build:@Ln:381
if (!empty ($_POST['passwd'])) {
$passwd = COM_applyFilter ($_POST['passwd']);
}
$user_templates->set_var ('passwd', $passwd);
-Add $passwd and $display under case 'create':@Ln:671:
$email = COM_applyFilter ($_POST['email']);
$email_conf = COM_applyFilter ($_POST['email_conf']);
$passwd = COM_applyFilter ($_POST['passwd']);
$display .= createuser(COM_applyFilter ($_POST['username']), $email, $email_conf, $passwd);
}
-Remove "&& ($email === $email_conf)" from email check @ Ln:211:
&& !USER_emailMatches ($email, $_CONF['disallow_domains'])
&& (strlen ($username) <= 16)) {
private/system/lib-user.php:
-Remove [= ''] definition from $password line 238:
Confirmed working on fresh install of Geeklog v2.1.0
If anything is unclear, let me know!
public/layout/modern_curve/users/registrationform.thtml:
> Add password element to form:
> Also remove second email input.
Text Formatted Code
<dt><label for="registrationform-passwd">{lang_passwd}</label></dt><dd><input type="password" size="32" maxlength="96" name="passwd" value="{passwd}" id="registrationform-passwd" class="text"{xhtml}></dd>
public/users.php:
-Disable mail submission by faking result confirm @Ln:84
Text Formatted Code
$mailresult = true;-Add $passwd variable to function createuser @Ln:197:
Text Formatted Code
function createuser ($username, $email, $email_conf, $passwd)-Add $passwd variable to $uid var; @Ln:247
Text Formatted Code
$uid = USER_createAccount ($username, $email, $passwd);-Add label:@Ln:358
Text Formatted Code
$user_templates->set_var('lang_passwd', "Password");-Add to form build:@Ln:381
Text Formatted Code
$passwd = '';if (!empty ($_POST['passwd'])) {
$passwd = COM_applyFilter ($_POST['passwd']);
}
$user_templates->set_var ('passwd', $passwd);
-Add $passwd and $display under case 'create':@Ln:671:
Text Formatted Code
} else {$email = COM_applyFilter ($_POST['email']);
$email_conf = COM_applyFilter ($_POST['email_conf']);
$passwd = COM_applyFilter ($_POST['passwd']);
$display .= createuser(COM_applyFilter ($_POST['username']), $email, $email_conf, $passwd);
}
-Remove "&& ($email === $email_conf)" from email check @ Ln:211:
Text Formatted Code
if (COM_isEmail ($email) && !empty ($username)&& !USER_emailMatches ($email, $_CONF['disallow_domains'])
&& (strlen ($username) <= 16)) {
private/system/lib-user.php:
-Remove [= ''] definition from $password line 238:
Text Formatted Code
function USER_createAccount($username, $email, $passwd, $fullname = ''[...]Confirmed working on fresh install of Geeklog v2.1.0
If anything is unclear, let me know!
20
16
Quote
All times are EST. The time is now 07:55 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content