Commit 28106053 authored by drsassafras's avatar drsassafras

[REM] password field tidy-up

parent 992c27f6
......@@ -129,7 +129,7 @@ reset()
fi
[[ -z $DB_DETECTED ]] && echo "WARNING: Could not detect database for instance"
if [[ -z "${APASSWORD}" ]]; then APASSWORD="12345"; fi
mysql -e "UPDATE users_users SET password='admin', hash= md5('${APASSWORD}') WHERE login='admin';" $DB_DETECTED && echo "SUCCESS: Admin password reset to ${APASSWORD} in database ${DB_DETECTED}" || echo "ERROR: admin password not reset in database ${DB_DETECTED}"
mysql -e "UPDATE users_users SET hash= md5('${APASSWORD}') WHERE login='admin';" $DB_DETECTED && echo "SUCCESS: Admin password reset to ${APASSWORD} in database ${DB_DETECTED}" || echo "ERROR: admin password not reset in database ${DB_DETECTED}"
}
update()
......
......@@ -46,7 +46,7 @@ class RedactDBCommand extends Command
$query = "UPDATE users_users SET email = ? WHERE login='admin';";
$bindvars = array('admin@example.com');
$result = $tikilib->query($query, $bindvars);
$query = "UPDATE `users_users` SET `password`='admin', `hash`= md5('admin') WHERE `login`='admin'";
$query = "UPDATE `users_users` SET `hash`= md5('admin') WHERE `login`='admin'";
$result = $tikilib->query($query);
// first get valid prefix
......@@ -133,8 +133,6 @@ class RedactDBCommand extends Command
}
$query = "UPDATE `users_users` SET `provpass` = '';";
$result = $tikilib->query($query);
$query = "UPDATE `users_users` SET `password` = '';";
$result = $tikilib->query($query);
// Remove user web-mail accounts
$output->writeln('<info>Removing user mail accounts.</info>');
......
......@@ -1606,9 +1606,6 @@ class UsersLib extends TikiLib
$this->set_user_password($res['userId'],$pass);
return array(USER_VALID, $user);
}
if (($res['password']) && $res['password'] === $pass){ // plain text password verification, currently only used in admin account activation.
var_dump($res['password']);
return array(USER_VALID, $user);}
return array(PASSWORD_INCORRECT, $user);
......
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