-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforgot.php
More file actions
53 lines (45 loc) · 1.18 KB
/
forgot.php
File metadata and controls
53 lines (45 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/*
***************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
****************************************************************
*/
define("THIS_PAGE","forgot");
define("PARENT_PAGE",'signup');
require 'includes/config.inc.php';
$mode = $_GET['mode'];
/**
* Reseting Password
* Sending Email
*/
if(isset($_POST['reset'])){
$input = post('forgot_username');
$userquery->reset_password(1,$input);
}
/**
* Reseting Password
* Real Reseting ;)
*/
$user = get('user');
if($mode =='reset_pass' && $user)
{
$input = mysql_clean(get('user'));
$avcode = mysql_clean(get('avcode'));
if($userquery->reset_password(2,$input,$avcode))
assign('pass_recover','success');
}
/**
* Recovering username
*/
if(isset($_POST['recover_username']))
{
$email = mysql_clean($_POST['forgot_email']);
$msg = $userquery->recover_username($email);
}
assign('mode',$mode);
subtitle(lang("com_forgot_username"));
template_files('forgot.html');
display_it();
?>