Notifications
Clear all

Recover Username?

6 Posts
4 Users
0 Reactions
1,497 Views
(@jessicarae)
Posts: 25
Eminent Member
Topic starter
 

URL to your eFiction: http://www.psychfic.com/
Version of eFiction: 3.5
Have you bridged eFiction, if so with what?: no
Version of PHP: 5.2.11
Version of MySQL: 5.1.43
Have you searched for your problem: yes
If so, what terms did you try: recover username, recover member name
State the nature of your problem: I've been getting emails here and there from members that can't remember their username. They try to create a new account, but can't since their email is already being used. Is there anyway for me to find their account via their email address without having to go through every single member? Is there a possible mod someone could create that adds a "Recover Username" action? Or mod the "Forgot password" to an action that sends both their password and their username to the email address they enter?
Do you have a test account for us? no


 
Posted : 01/03/2010 12:02 pm
(@tammy)
Posts: 2577
Member Moderator
 

You can use phpmyadmin through your host's control panel to find a username based on an email address.  Sending the username as well might be a good idea.  I'd have to think about it though because there's security considerations with that as you're sending both username AND password of an account in the same email.  It might make it easier for someone to steal account logins.


 
Posted : 01/03/2010 1:34 pm
(@jessicarae)
Posts: 25
Eminent Member
Topic starter
 

You can use phpmyadmin through your host's control panel to find a username based on an email address.  Sending the username as well might be a good idea.  I'd have to think about it though because there's security considerations with that as you're sending both username AND password of an account in the same email.  It might make it easier for someone to steal account logins.

Thank you so much!

Maybe instead of sending both in the same email, have it as a separate recovery option? One that only recovers the username, and besides providing their email address they have to answer a security question? Something like that?


 
Posted : 01/03/2010 2:00 pm
(@tammy)
Posts: 2577
Member Moderator
 

It's not something that will happen any time soon.


 
Posted : 01/03/2010 2:52 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

You can use this to create an admin-available search function that will search for members by email.

There is also a mod to add the username to the new password email. I'd thought about the security aspect of it for a while before trying to do this. In the end I decided that it was okay, since a username retrieval method would probably be similar anyway. It definitely helped lower both the requests for username and the number of duplicate signups.


 
Posted : 01/03/2010 3:08 pm
 Pari
(@pari)
Posts: 18
Active Member
 

I had modded it for ver 2 which I run one of my archives on, then decided to tested on the latest ver which I use for another archive I have. It works on both. Basically if someone forgets their penname they can retreive it by putting in their email address, and the penname displays for them.

Not sure if this is what you're looking for but I modded a 'lost Penname' feature for ver 2 and ver 3.3.

Create a file in the 'user' folder, name it 'lostpenname.php' and paste the code below and 'save':

<?php
// ----------------------------------------------------------------------
// eFiction 3.2
// Copyright (c) 2007 by Tammy Keefer
// Valid HTML 4.01 Transitional
// Based on eFiction 1.1
// Copyright (C) 2003 by Rebecca Smallwood.
// http://efiction.sourceforge.net/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------

if(!defined("_CHARSET")) exit( );
if(!function_exists("random_char")) {

function random_char($string)
{
$length = strlen($string);
$position = mt_rand(0, $length - 1);
return ($string[$position]);
}

function random_string ($charset_string, $length)
{
$return_string = random_char($charset_string);
for ($x = 1; $x < $length; $x++)
$return_string .= random_char($charset_string);
return $return_string;
}

}
if($loggedin) accessDenied( );

$output .= "<div id="pagetitle">"._LOSTPENNAME."</div>";

  if(isset($_POST['submit'])) {
  $result = dbquery("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE email = '$_POST[email]'");
  list($uid, $penname) = dbrow($result);
  if(dbnumrows($result) == 0) $output .= write_message(_WRONGPENNAME);

   
  else {
$data = mysql_query("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE email = '$_POST[email]'") or die(_FATALERROR."Query: SELECT "._UIDFIELD." as uid "._AUTHORTABLE." WHERE email = '$_POST[email]''<br />Error: (".mysql_errno( ).") ".mysql_error( ));
   
   
    while($info = mysql_fetch_array( $data ))
    {
   
    $output .= "<center>".$info['penname']."</center>";
   
   

}

}
}

else {
$output .= "<form method="POST" enctype="multipart/form-data" action="user.php?action=lostpenname">
<table align="center" width="300">
<tr><td>"._ENTEREMAIL."</td></tr>
<tr><td><INPUT  type="text" class="textbox=" name="email"><INPUT type="submit" class="button" name="submit" value=""._SUBMIT.""></form>
</td></tr></table>";
}
?>

Next open the 'login.php' file in the 'user' folder. Towards the bootom of the page look for the '$linkquery' and replace it with this:

$linkquery = dbquery("SELECT * from ".TABLEPREFIX."fanfiction_pagelinks WHERE link_name = 'login' OR link_name = 'lostpassword' OR link_name = 'lostpenname'");

Go a bit further down that page and look for '$output' which should be the last bit of coding there, and replace it with this:

$output .= "<div style='text-align: center;'>".$pagelinks['register']['link']." | ".$pagelinks['lostpassword']['link']." | ".$pagelinks['lostpenname']['link']."</div>";

Next you'll need to log into your site and create a 'panel' for this new feature; just copy the 'lostpassword' panel info but change the names to 'lostpenname' and 'Lost Penname' everything else would be the same.

Finally go to the 'Languaes/en.php' folder/file and add this:

// User - Lost Penname

// User - Lost Penname

define ("_LOSTPENNAME", "Lost penname");
define ("_WRONGPENNAME", "That address doesn't appear to be in our database. <a href=""user.php?action=lostpenname">Please" try again.</a>");

 
Posted : 25/07/2010 6:07 am
Share: