15) { $error_password_length_g = TRUE; $error = TRUE; } elseif (strlen($password) <5) { $error_password_length_l = TRUE; $error = TRUE; } if ($error != TRUE) { try { if( User::change_password($password, $forgot_password_id) ){ $msg_id = 7004; header("Location: $base_url/login.php?msg_id=$msg_id" ); exit; } } catch (PAException $e) { $msg = "$e->message"; $save_error = TRUE; } } } if ($error == TRUE || $save_error == TRUE) { $error = TRUE; } function setup_module ($column, $moduleName, $obj) { } /** * Function : setup_module() * Purpose : call back function to set up variables * used in PageRenderer class * To see how it is used see api/PageRenderer/PageRenderer.php * @param $column - string - contains left, middle, right * position of the block module * @param $moduleName - string - contains name of the block module * @param $obj - object - object reference of the block module * @return type string - returns skip means skip the block module * returns rendered html code of block module */ $page = new PageRenderer("setup_module", PAGE_CHANGE_PASSWORD, "Change Password page", "container_one_column.tpl", "header.tpl", PUB, HOMEPAGE, $network_info); $css_array = get_network_css(); if (is_array($css_array)) { foreach ($css_array as $key => $value) { $page->add_header_css($value); } } if (!empty($error)) { if ($error_login_name == TRUE) { $msg = "Username $login_name is already taken"; } if ($error_password_match == TRUE) { $msg = "Error: Passwords do not match."; } if ($error_password_length_g == TRUE) { $msg = "The password must be less than 15 characters."; } if ($error_password_length_l == TRUE) { $msg = "The password must be greater than 5 characters."; } if ($error == TRUE) { $msg1 = "Sorry: your password has not been changed.
Reason: ".$msg; } else { $msg1 = "Congratulations!!!
your password has been changed successfully."; } $content = & new Template(CURRENT_THEME_FSPATH."/display_message.tpl"); $content->set('message', $msg1); $page->add_module("middle", "top", $content->fetch()); } echo $page->render(); ?>