Changeset 487
- Timestamp:
- 10/17/2006 07:43:57 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
bb-includes/capabilities.php (modified) (5 diffs)
-
bb-includes/registration-functions.php (modified) (1 diff)
-
bb-templates/profile-edit.php (modified) (1 diff)
-
profile-edit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-includes/capabilities.php
r427 r487 57 57 'write_topics' => true, 58 58 'write_posts' => true, 59 'change_password' => true, 59 60 'read' => true 60 61 )), … … 89 90 'write_topics' => true, 90 91 'write_posts' => true, 92 'change_password' => true, 91 93 'read' => true 92 94 )), … … 116 118 'write_topics' => true, 117 119 'write_posts' => true, 120 'change_password' => true, 118 121 'read' => true 119 122 )), … … 131 134 'write_topics' => true, 132 135 'write_posts' => true, 136 'change_password' => true, 133 137 'read' => true 134 138 )), … … 137 141 'name' => __('Inactive'), 138 142 'capabilities' => array( 143 'change_password' => true, 139 144 'read' => true 140 145 )), -
trunk/bb-includes/registration-functions.php
r455 r487 79 79 if ( !$user_id = $bbdb->get_var("SELECT user_id FROM $bbdb->usermeta WHERE meta_key = 'newpwdkey' AND meta_value = '$key'") ) 80 80 bb_die(__('Key not found.')); 81 if ( $user = bb_get_user( $user_id ) ) :81 if ( $user = new BB_User( $user_id ) ) : 82 82 if ( bb_has_broken_pass( $user->ID ) ) 83 83 bb_block_current_user(); 84 if ( !$user->has_cap( 'change_password' ) ) 85 bb_die( __('You are not allowed to change your password.') ); 84 86 $newpass = bb_random_pass( 6 ); 85 87 bb_update_user_password( $user->ID, $newpass ); -
trunk/bb-templates/profile-edit.php
r469 r487 75 75 <?php endif; ?> 76 76 77 <?php if ( $bb_current_user->ID == $user->ID ) : ?>77 <?php if ( $bb_current_user->ID == $user->ID && bb_current_user_can( 'change_password' ) ) : ?> 78 78 <fieldset> 79 79 <legend><?php _e('Password'); ?></legend> -
trunk/profile-edit.php
r470 r487 96 96 endif; 97 97 98 if ( !empty( $_POST['pass1'] ) && $_POST['pass1'] == $_POST['pass2'] && $bb_current_user->ID == $user->ID ) :98 if ( bb_current_user_can( 'change_password' ) && !empty( $_POST['pass1'] ) && $_POST['pass1'] == $_POST['pass2'] && $bb_current_user->ID == $user->ID ) : 99 99 bb_update_user_password ( $bb_current_user->ID, $_POST['pass1'] ); 100 100 bb_cookie( $bb->passcookie, md5( md5( $_POST['pass1'] ) ) ); // One week
Note: See TracChangeset
for help on using the changeset viewer.