Commit a93b2a17 authored by Kjartan's avatar Kjartan

- user.module used a obsolete variable_get.

- set blocks for new users.
parent 837041f1
......@@ -248,6 +248,14 @@ function block_admin() {
function block_user($type, &$edit, &$user) {
switch ($type) {
case "register_form":
$result = db_query("SELECT * FROM blocks WHERE custom = '%d' ORDER BY name", 1);
while ($block = db_fetch_object($result)) {
$form .= form_hidden("block][$block->name", $block->status);
}
return $form;
case "edit_form":
$result = db_query("SELECT * FROM blocks WHERE custom = '%d' ORDER BY name", 1);
......
......@@ -248,6 +248,14 @@ function block_admin() {
function block_user($type, &$edit, &$user) {
switch ($type) {
case "register_form":
$result = db_query("SELECT * FROM blocks WHERE custom = '%d' ORDER BY name", 1);
while ($block = db_fetch_object($result)) {
$form .= form_hidden("block][$block->name", $block->status);
}
return $form;
case "edit_form":
$result = db_query("SELECT * FROM blocks WHERE custom = '%d' ORDER BY name", 1);
......
......@@ -480,7 +480,7 @@ function user_block() {
$output .= "<input name=\"edit[remember_me]\" type=\"checkbox\" />". t("Remember me") ."<br />\n";
$output .= "<input name=\"edit[op]\" type=\"submit\" value=\"". t("Log in") ."\" /><br />\n";
$output .= "</form></div>\n";
if (variable_get("account_register", 1)) {
if (variable_get("user_register", 1)) {
$output .= "&#187; ". lm(t("Register"), array("mod" => "user", "op" => "register"), t("Create a new user account.")) ."\n";
}
$output .= "<br />&#187; ". lm(t("New password"), array("mod" => "user", "op" => "password"), t("Request new password via e-mail")) ."<br />";
......
......@@ -480,7 +480,7 @@ function user_block() {
$output .= "<input name=\"edit[remember_me]\" type=\"checkbox\" />". t("Remember me") ."<br />\n";
$output .= "<input name=\"edit[op]\" type=\"submit\" value=\"". t("Log in") ."\" /><br />\n";
$output .= "</form></div>\n";
if (variable_get("account_register", 1)) {
if (variable_get("user_register", 1)) {
$output .= "&#187; ". lm(t("Register"), array("mod" => "user", "op" => "register"), t("Create a new user account.")) ."\n";
}
$output .= "<br />&#187; ". lm(t("New password"), array("mod" => "user", "op" => "password"), t("Request new password via e-mail")) ."<br />";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment