Changeset 258
- Timestamp:
- 02/19/06 00:47:29 (3 years ago)
- Files:
-
- devel/units/admin/admin_actions.php (modified) (1 diff)
- devel/units/invite/invite_actions.php (modified) (2 diffs)
- devel/units/users/function_create_user.php (added)
- devel/units/users/main.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/units/admin/admin_actions.php
r255 r258 141 141 $md5password = md5($password); 142 142 143 db_query("insert into users set username = '" . $new_username[$i] . "', name = '" . $new_name[$i] . "', email = '" . $new_email[$i] . "', password = '".$md5password."', active = 'yes', user_type = 'person'"); 144 $newid = db_id(); 145 146 // Calendar code shouldn't go here! But its here anyways so just checking 147 // the global function array to check to see if calendar module is loaded. 148 149 global $function; 150 if(isset($function["calendar:init"])) 151 db_query("insert into calendar(owner) values({$newid})"); 143 $newid = run("users:create", array("username" => $new_username[$i], 144 "name" => $new_name[$i], 145 "email" => $new_email[$i], 146 "active" => "yes", 147 "user_type" => "person")); 152 148 153 149 $rssresult = run("weblogs:rss:publish", array($newid, false)); devel/units/invite/invite_actions.php
r255 r258 50 50 $from_email = $_SESSION['email']; 51 51 } 52 $emailmessage = sprintf(gettext("Dear %s,\n\n%s %s\n\nTo join, visit the following URL:\n\n\t%s\n\nYour email address has not been passed onto any third parties, and will be removed from our system within seven days.\n\nRegards,\n\nThe %s team."),$strippedname,$greetingstext,$invitetext,$url, $sitename); 52 $emailmessage = sprintf(gettext("Dear %s,\n\n%s %s\n\nTo join, visit the following URL:\n\n\t%s\n\nYour email address has not been passed onto any third parties, and will be removed from our system within seven days.\n\nRegards,\n\nThe %s team."),$strippedname,$greetingstext,$invitetext,$url, $sitename); 53 53 $emailmessage = wordwrap($emailmessage); 54 54 $messages[] = sprintf(gettext("Your invitation was sent to %s at %s. It will be valid for seven days."),$strippedname,$email); … … 105 105 $details = $details[0]; 106 106 $email = $details->email; 107 db_query("insert into users set name = '$name', 108 password='$password', 109 username = '$username', 110 email = '$email'"); 111 $ident = db_id(); 107 $ident = run("users:create", array("name" => $name, 108 "password" => $password, 109 "username" => $username, 110 "email" => $email)); 112 111 113 114 // Calendar code is in the wrong place!115 global $function;116 if(isset($function["calendar:init"]))117 db_query("INSERT INTO calendar SET owner = {$ident}");118 112 119 113 devel/units/users/main.php
r45 r258 66 66 // Permissions checker 67 67 $function['permissions:check'][] = path . "units/users/permissions_check.php"; 68 69 // Create user 70 $function['users:create'][] = path . "units/users/function_create_user.php"; 68 71 69 72 // Flag functions:
