I am the super admin or user 1.
I want to allow another person to admin users.
But he/she is able to change my password or even delete me under user management, user, list.
This cant be allowed.
What to do.
Please help.

Comments

rogerpfaff’s picture

good point.

there must be additional permissions for administration of user 1. why this is not yet in core might be interesting to know.

Anoop Lal’s picture

Is there not any solution to this? I very badly need a solution to this problem.

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

Will this do http://drupal.org/project/ucreate ?

- Arie

ainigma32’s picture

Status: Postponed (maintainer needs more info) » Fixed

Looks like Anoop Lal won't be posting any feedback so I'm setting this to fixed.

Feel free to reopen if you think that is wrong.

- Arie

Anoop Lal’s picture

Status: Fixed » Postponed (maintainer needs more info)
Anoop Lal’s picture

I had given up hope.
But Ucreate came as a lifesaver.
Thanx

But there is a problem
On clicking 'Add' new user is created but Unable to send email.
Problem only with ucreate. Able to send email with core 'Add User'.
Any solution?
Would be a great help.

Anoop

Anoop Lal’s picture

Priority: Normal » Critical
michelle’s picture

Project: Drupal core » U Create
Version: 6.0 » 6.x-1.0-beta1
Component: user system » Miscellaneous
Assigned: Anoop Lal » Unassigned
Priority: Critical » Normal

Moving this over to the proper queue.

Michelle

foaad’s picture

It looks like the 6.0 beta version hasn't changed to the drupal 6.0 mail notification format. In the .module file, line 290, I see this:

if (!drupal_mail('ucreate-create', $edit['mail'], $subject, $body)) {

which is exactly like the 5.x version of the module. But drupal_mail() has changed. See:
http://api.drupal.org/api/function/drupal_mail

I don't see a "ucreate_mail" handler in the module. No emails are being sent.

A quick (and VERY DIRTY) solution is to replace this line

if (!drupal_mail('ucreate-create', $edit['mail'], $subject, $body)) {

with

if (!_user_mail_notify('password_reset',$account)) {

at .module line 290. This is the notify function sent by Drupal on a reset password operation. It completely disregards any of the ucreate settings including "welcome message", but at least it gets the job done.

foaad’s picture

Actually, forget this one.

I just went one step further and implemented the whole mail solution. I think this works pretty well.
The following is my replacement code in ucreate.module, from line 290, until the end of the file. Note that I commented out the existing line 290, added a line constructing parameters, and a function at the very end.


    //if (!drupal_mail('ucreate-create', $edit['mail'], $subject, $body)) {
    $par = array('subject' => $subject, 'body' => $body);
    if (!drupal_mail('ucreate','notice',$account->mail, user_preferred_language($account), $par)) {
      drupal_set_message(t('Error sending notification mail to user.'), 'error');
    }
  }
  else {
    drupal_set_message(t('Error creating user.'), 'error');
  }
  return $account;
}

function ucreate_mail($key, &$message, $params) {
        $language = $message['language'];
        switch($key) {
                case 'notice':
                        $message['subject'] = $params['subject'];
                        $message['body'] = $params['body'];
                        break;
        }       
}
Anoop Lal’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks a lot
This issue is resolved
Thanks to all those who contributed to this.

Anoop

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.