Example #1
0
 private static function reset_password($id)
 {
     CRUD::dataFetch('member', array('id' => $id));
     list($row) = CRUD::$data;
     $rand_password = CORE::rand_password();
     $forget_temp = 'ogs-mail-forget-tpl.html';
     CRUD::dataUpdate('member', array('password' => md5($rand_password), 'id' => $row["id"]));
     CORE::msg(self::$lang["forget_send"], CORE::$manage . 'member/detail/' . $row["id"] . '/');
     # 原本樣板
     new VIEW(self::$temp_option["HULL"], self::$temp, true, 1);
     $origin_output = VIEW::$output;
     # 輸出取回密碼樣板
     VIEW::assignGlobal('VALUE_RAND_PASSWORD', $rand_password);
     new VIEW($forget_temp, false, true, false);
     CORE::mail_handle(SYSTEM::$setting["email"], $row["email"], VIEW::$output, self::$lang["forget_recall"], SYSTEM::$setting["name"]);
     # 寄出認證信
     exit;
 }
Example #2
0
 private static function reverify()
 {
     $manager = SESS::get("MANAGER");
     $reverify_code = CORE::rand_password();
     SESS::write('reverify', $reverify_code);
     $mail_temp = 'ogs-mail-manager-reverify-tpl.html';
     VIEW::assignGlobal('VALUE_REVERIFY_CODE', $reverify_code);
     new VIEW($mail_temp, false, true, 1);
     CORE::mail_handle(SYSTEM::$setting["email"], $manager["account"], VIEW::$output, CORE::$lang["manager_verify"], SYSTEM::$setting["name"]);
     # 寄出認證信
 }
Example #3
0
 private static function forget()
 {
     CHECK::is_email($_POST["email"]);
     if (CHECK::is_pass()) {
         $rsnum = CRUD::dataFetch('manager', array('account' => $_POST["email"], 'status' => '1', 'ban' => '0'));
         if (!empty($rsnum)) {
             list($row) = CRUD::$data;
             $rand_password = CORE::rand_password();
             $forget_temp = 'ogs-mail-manager-forget-tpl.html';
             CRUD::dataUpdate('manager', array('password' => md5($rand_password), 'id' => $row["id"]));
             # 輸出取回密碼樣板
             VIEW::assignGlobal('VALUE_RAND_PASSWORD', $rand_password);
             new VIEW($forget_temp, false, true, 1);
             CORE::mail_handle(SYSTEM::$setting["email"], $row["account"], VIEW::$output, CORE::$lang["forget_recall"], SYSTEM::$setting["name"]);
             # 寄出認證信
             CORE::msg(CORE::$lang["forget_send"], CORE::$manage);
         } else {
             CORE::msg(CORE::$lang["account_none"], CORE::$manage);
         }
     } else {
         CORE::msg(CHECK::$alert, CORE::$manage);
     }
 }