User Management

Anoop Lal - November 6, 2008 - 08:19
Project:U Create
Version:6.x-1.0-beta1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

rogerpfaff - November 6, 2008 - 08:34

good point.

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

#2

Anoop Lal - November 11, 2008 - 09:03

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

#3

ainigma32 - December 19, 2008 - 11:57
Status:active» postponed (maintainer needs more info)

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

- Arie

#4

ainigma32 - January 2, 2009 - 12:21
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

#5

Anoop Lal - January 12, 2009 - 16:00
Status:fixed» postponed (maintainer needs more info)

#6

Anoop Lal - January 12, 2009 - 16:07

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

#7

Anoop Lal - January 13, 2009 - 02:08
Priority:normal» critical

#8

Michelle - January 13, 2009 - 02:28
Project:Drupal» U Create
Version:6.0» 6.x-1.0-beta1
Component:user system» Miscellaneous
Priority:critical» normal
Assigned to:Anoop Lal» Anonymous

Moving this over to the proper queue.

Michelle

#9

foaad - January 14, 2009 - 11:29

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.

#10

foaad - January 14, 2009 - 11:55

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.

<?php
   

   
//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;
        }      
}
?>

#11

Anoop Lal - January 14, 2009 - 18:29
Status:postponed (maintainer needs more info)» fixed

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

Anoop

#12

System Message - January 28, 2009 - 18:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.