Project:Paranoia
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

I understand why no one can change admin's password - but can't admin change his/her own password?!?!
Only through DB?

Comments

#1

I actually don't know why I did this...

#2

Title:admin cannot change own password - intentioanl?» Allow uid 1 to change password
Version:5.x-1.0» 6.x-1.x-dev
Component:Documentation» Code
Category:support request» bug report

Seems better?

The alternative is that we should provide some documentation to say "use drush to change uid1 password" (since it does passwords now).

#3

Status:active» closed (works as designed)

In 6.x UID 1 can change his/her password:

<?php
case 'user_profile_form': // Prevent modifying user/1
     
if ($form['#uid'] === '1') {
        global
$user;
       
// Allow user/1 to edit own details.
       
if ($user->uid != 1) {
         
drupal_set_message('You must login as this user (user/1) to modify the email address and password for this account.');
         
$form['account']['mail']['#access'] = FALSE;
         
$form['account']['pass']['#access'] = FALSE;
        }
      }
      break;
?>