Announcements

The New PHP-Fusion USA
by NetriX - 4 weeks ago
Free Hosting
by NetriX - 2 months ago

Latest Posts

MySql?
by daimonbok - 15 hours ago
Video Infusion 3.2.0
by NetriX - 20 hours ago
Version 9 with php 7
by daimonbok - 7 days ago
Facebook Connect 3.0.0
by daimonbok - 1 week ago
URL shortening in PHP
by jim09 - 1 week ago
PHP-Fusion 9 Extensive Demo
by NetriX - 1 week ago
[FORUM RANKS] Flat
by Homdax - 4 weeks ago
The New PHP-Fusion USA
by NetriX - 4 weeks ago
[GUIDE] Optimize PHP-Fusion Website
by NetriX - 4 weeks ago
[FORUM RANKS] ForumCore
by NetriX - 4 weeks ago

View Thread

Who is here? 1 guest(s)
 Print Thread
Email Login Tutorial
NetriX
Using an email address as an substitute in PHP-Fusion is both more secure and promotes anti-spam capabilities in comparison to the default username login.

As a pre-warning, if you decide to make the modifications, you will not be able to login with your username, you, along with all your websites members, will need to login using their email.

This tutorial was developed using PHP-Fusion v7.02.06. It can become backwards compatible if one knows where to edit/replace via earlier versions.

Let's get started!

---------------------------------------------------------------------------------------------

Edit the Authenticate Class: includes/classes/Authenticate.class.php

Around line 41 -

Change:

Download source  Code
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_name='".$inputUserName."' LIMIT 1");




To:

Download source  Code
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_email='".$inputUserName."' LIMIT 1");




Now all one needs to do is edit instances where the user would normally use the field UserName such as the user login panel - Change UserName to Email so as to not confuse the member to which to use.
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Sun-Wed. Send me a PM if urgent.
 
Advertisement
Harlekin
With this code you can use both Nickname or Emailadress
Download source  Code
$result = dbquery("   SELECT * FROM ".DB_USERS." WHERE user_name='".$inputUserName."' || user_email='".$inputUserName."' LIMIT 1");


 
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
Facebook Login Infusions Support 4 12-11-2016 13:32
Include Custom Login Panel General Chat 1 05-17-2015 07:39
Facebook connect does not show the fields to register or login Infusions Support 5 02-22-2015 14:53
[Tutorial] Speed Up Adsense Page Loading [7.02.XX] Code Snippets 2 01-04-2015 13:25
[Commission] Login panel Addon Requests 12 12-11-2013 12:10


WE RECOMMEND THIS HOST - PHP-Fusion Hosting