4 * checks whether a password matches a users password
6 function tool_pref_check_old_password($userinfo, $password)
8 if (!is_array($userinfo) && !isset($userinfo['user_id'])) return false;
10 $encoded_password = md5($password);
11 if ($encoded_password == $userinfo['user_password']) return true;
17 * update a user's password
19 function tool_pref_update_user_password($userinfo, $password)
23 if (!is_array($userinfo) && !isset($userinfo['user_id'])) return false;
24 if ($password == '') return false;
26 $encoded_password = md5(trim($password));
28 $sql = "UPDATE ". NELDB_USER_TABLE
." SET user_password='". $encoded_password ."' WHERE user_id=". $userinfo['user_id'];
34 function tool_pref_update_menu_style($userinfo, $menu)
38 $sql = "UPDATE ". NELDB_USER_TABLE
." SET user_menu_style=". $menu ." WHERE user_id=". $userinfo['user_id'];
42 function tool_pref_update_default_application($userinfo, $application_id)
46 $sql = "UPDATE ". NELDB_USER_TABLE
." SET user_default_application_id=". $application_id ." WHERE user_id=". $userinfo['user_id'];