forked from corgus/eas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
change_password.php
38 lines (32 loc) · 1.05 KB
/
change_password.php
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
<?php
/*
Template Name: Change Password
*/
get_currentuserinfo();
if (isset($_POST['newpass'])) {
wp_update_user(array(
'ID' => $user_ID,
'user_pass' => $_POST['newpass']
));
$_GET['action'] = 'updatepassword';
}
get_header(); ?>
<?php roots_content_before(); ?>
<div id="content" class="<?php echo CONTAINER_CLASSES; ?>">
<?php roots_main_before(); ?>
<div id="main" class="<?php echo FULLWIDTH_CLASSES; ?>" role="main">
<?php roots_loop_before(); ?>
<?php get_template_part('loop', 'settings'); ?>
<?php if (is_user_logged_in()) { ?>
<form class="form-inline" method="post" action="">
<p>Enter your desired new password here to change it.</p>
<input name="newpass" type="password" placeholder="New Password">
<input class="btn" type="submit" value="Save">
</form>
<?php } ?>
<?php roots_loop_after(); ?>
</div><!-- /#main -->
<?php roots_main_after(); ?>
</div><!-- /#content -->
<?php roots_content_after(); ?>
<?php get_footer(); ?>