Welcome to Geeklog, Anonymous Wednesday, May 22 2024 @ 07:49 pm EDT

Geeklog Forums

How to add support for password sign-up (gl-2.1.0)

Status: offline


Forum User
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.

> 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>

-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)) {

-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!

All times are EDT. The time is now 07:49 pm.

  • 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