summaryrefslogtreecommitdiff
path: root/modules/account.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-06-17 18:31:25 +0000
committerDries Buytaert <dries@buytaert.net>2001-06-17 18:31:25 +0000
commit03c06a86ebb9521f0a81343e1648a87c5ea9247f (patch)
tree6cf523b3241e8920a8836b2863d506d2bf5a190e /modules/account.module
parentd388033eb206572c5eca9fe4eeccbd6879dee207 (diff)
downloadbrdo-03c06a86ebb9521f0a81343e1648a87c5ea9247f.tar.gz
brdo-03c06a86ebb9521f0a81343e1648a87c5ea9247f.tar.bz2
Oops, a rather large commit:
- Changed meta.module, node.module and index.php to use comma-seperated lists of attributes rather then "foo=a,bar=b" lists. This makes it a a lot easier to use both modules. In addition, error handling can be discarded as it can't be made any simpler, really ... It fits rather nicely in Drupal's design so I'm getting more and more happy with this meta.module (but we are not 100% there yet). - node.module, node.inc: + Improved the node-related admin interface so that navigating back and forth the administrative menus is made both easier and faster. + Removed some redundant database fields from the node table. See 2.00-to-x.xx.sql! + Added 2 news hooks called "node_insert" and "node_update". Just like this is the case with the existing hook "node_delete" these new hooks will automatically get called when a node has been inserted or udpated. Note that this is an optional call-back that only needs to be implemented when required. With the addition of these two hooks, the node mechanism (version 1) is pretty well completed. - watchdog.module: + Fixed bug whit the 'regular messages' query in the watchdog.module. - book.module: + Fixed bug in book.module: the 'parent' was not set properly when updating a book page. + Made it so that older versions of a book page are automatically reactived upon deletion of the most recent version, i.e. when doing a version roll-back. - comment.inc: + Undid Remco's patch to comment.inc; it does not work in some cases. - conf.module: + Fine-tuned some of the options in conf.module a bit. - marvin.theme: + Visual changes to make it look better on Windows browsers. Mind to give some feedback on this? + Fixed 3 HTML typos/bugs. + XHTML-ified the theme at a best effort basis; I didn't carry the XHTML specification with me. + Made use of the theme_slogan variable to display the site's slogan. + As soon we have at least one valid XHTML theme we can wonder on how to integrate other XML namespaces (cfr. MathML story at drop.org). - database.mysql: + Updated database.mysql so that it contains all the latest "database patches".
Diffstat (limited to 'modules/account.module')
-rw-r--r--modules/account.module14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/account.module b/modules/account.module
index 3ef4632e3..fe654f5a6 100644
--- a/modules/account.module
+++ b/modules/account.module
@@ -169,36 +169,36 @@ function account_save($edit, &$name) {
}
}
db_query("UPDATE users SET $query access = '' WHERE userid = '$name'");
-
+
if ($edit[access]) {
foreach ($edit[access] as $key=>$value) {
$account = user_load($name);
db_query("UPDATE users SET access = '". field_set($account->access, $value, 1) ."' WHERE id = $account->id");
}
}
-
+
watchdog("account", "account: modified user '$name'");
}
else {
$edit[userid] = trim($edit[userid]);
$edit[real_email] = trim($edit[real_email]);
$edit[name] = $edit[realname];
-
+
if ($error = account_validate($edit)) {
return $error;
}
else {
$edit[passwd] = account_password();
$edit[hash] = substr(md5("$edit[userid]. ". time()), 0, 12);
-
+
$user = user_save("", array("userid" => $edit[userid], "real_email" => $edit[real_email], "passwd" => $edit[passwd], "status" => 1, "hash" => $edit[hash]));
-
+
$link = path_uri() ."account.php?op=confirm&name=$edit[userid]&hash=$edit[hash]";
$subject = strtr(t("Account details for %a"), array("%a" => variable_get(site_name, "drupal")));
$message = strtr(t("%a,\n\n\nsomeone signed up for a user account on %b and supplied this e-mail address as their contact. If it wasn't you, don't get your panties in a knot and simply ignore this mail. If this was you, you will have to confirm your account first or you will not be able to login. To confirm your account visit the URL below:\n\n %c\n\nOnce confirmed you can login using the following username and password:\n\n username: %a\n password: %d\n\n\n-- %b team\n"), array("%a" => $edit[userid], "%b" => variable_get(site_name, "drupal"), "%c" => $link, "%d" => $edit[passwd]));
-
+
watchdog("account", "new account: `$edit[userid]' &lt;$edit[real_email]&gt;");
-
+
mail($edit[real_email], $subject, $message, "From: noreply");
$name = $edit[userid];
}