~joshli/coalgames/trunk

« back to all changes in this revision

Viewing changes to cg-content/themes/avacado/reset_password.php

  • Committer: Joshua Li
  • Date: 2010-02-19 04:27:55 UTC
  • Revision ID: joshli@joshtime.com-20100219042755-ezg72431th2vu7t7
A finally working reset password.
A mail is sent out with a link to the reset password page. It is a very secure page.
Many items have been changed here and there so that this page fits.
Many new comments added.
Forgot to add some stuff a while ago
Added a new item to cg-settings called on.mail. If false, then no mail will be sent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/*
 
3
 * Coal Games
 
4
 *
 
5
 * @package Coal Games
 
6
 */
 
7
 
 
8
/**
 
9
 * If file was accessed directly, exit to prevent problems.
 
10
 * First, it tries to go to cg-directfile.php. If that file
 
11
 * is not found, then it just displays a generic message.
 
12
 * This is so that you can place a link or other message on
 
13
 * a file so that if a search engine linked to it, you could
 
14
 * get a link back to your main site.
 
15
 */
 
16
if ( !defined('IN_CG') ) {
 
17
        if ( !( @include( '../../../cg-directfile.php' ) ) ) {
 
18
                die("File can not be accessed directly");
 
19
        }
 
20
}
 
21
 
 
22
require THEME_PATH . 'header.php';
 
23
?>
 
24
<div id="content">
 
25
 
 
26
<h2>Forgot Password Form</h2>
 
27
<form action="<?php echo $reset_password_form_url;?>" method="post" class="cgform longlabel hugelabel">
 
28
 
 
29
    <p><label>New Password</label><input type="password" name="password1" size="<?php echo $cg_settings['user.max_password']; ?>" /></p>
 
30
    <p>Please enter either in your new password.</p>
 
31
    <p class="error"><?php echo esc_attr(cg_form_error( 'password1' )); ?></p>
 
32
    <p><label>Confirm Password</label><input type="password" name="password2" size="<?php echo $cg_settings['user.max_password']; ?>" /></p>
 
33
    <p>Please type in your password again to make sure it is correct.</p>
 
34
    <p class="error"><?php echo esc_attr(cg_form_error( 'password2' )); ?></p>
 
35
    <p><input type="hidden" name="submittedrpass" value="TRUE" /></p>
 
36
    <input type="submit" name="submit" value="Reset Password" />
 
37
    
 
38
</form>
 
39
</div>
 
40
<?php
 
41
require THEME_PATH . 'footer.php';