The default user just get replaced

Makes it possible for admin to create users from admin panel
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

The default user just get replaced

Postby MoonWalker on Mon 15. Sep, 2003 11:35

Have installed this MOD and it seam to work EXCEPT for the account info for
Code: Select all
// define a "dummy user", the profile settings of this user, will be used as default settings for new users
define('DEFAULT_USER_ID', 2);
just get replaced all the time with the new users data.

I have found 2 issues that may have to do with this. In the install instructions it says
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
$user_id = intval($HTTP_POST_VARS['id']);

#
#-----[ REPLACE WITH ]------------------------------------------
#
$user_id = ($new_user) ? $user_id : intval($HTTP_POST_VARS['id']);
it's just that the line to find exsists twice! As nothing else is said I assume onlythe first instance should be replaced?

I also have the Attachment MOD (2.3.9) installed and it also insert a line within the same nested if clause(a bit above)
Code: Select all
if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) )
{
   attachment_quota_settings('user', $HTTP_POST_VARS['submit'], $mode);
   //
   // Ok, the profile has been modified and submitted, let's update
   //
   if ( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) || isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) )
   {
      //$user_id = intval($HTTP_POST_VARS['id']);
      $user_id = ($new_user) ? $user_id : intval($HTTP_POST_VARS['id']);
      if (!($this_userdata = get_userdata($user_id)))
      {
Can this cause it?
I may also note that I set a new passwd and add an emailaddress before submit the form.

Talking about email, it would be nice with an option to send out an email to the added user with account info and some welcome phrase. I saw this line in the MOD code
Code: Select all
//send out email notification goes here
so maybe it's though of as a future amendment?
MoonWalker
Poster
Poster
 
Posts: 5
Joined: Mon 15. Sep, 2003 01:23

Postby MoonWalker on Sat 20. Sep, 2003 16:38

come on, someone must have some input on this! If it gives some hint, after submit the new user I got this message from phpbb
Code: Select all
The user's profile was successfully updated.

Click Here to return to User Administration

Click Here to return to the Admin Index
and that's right, the account used as an template for the new user is getting updated with the data I put in and no new user is added?
MoonWalker
Poster
Poster
 
Posts: 5
Joined: Mon 15. Sep, 2003 01:23

Postby MoonWalker on Sat 20. Sep, 2003 17:25

Well I removed the mod and installed it again with EM and now it seam to work... strange, I'm 100% sure I did exactly as stated in the install file, but well I'm human and that's maybe whats differes :-)
MoonWalker
Poster
Poster
 
Posts: 5
Joined: Mon 15. Sep, 2003 01:23


Return to Admin add users [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 0 guests

cron