Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Fixed e-mail confirmation logic. | dd5b4be2e8e49aa612ddf7557e8ef0b1e0268822 | Catalin(ux) M. BOIE | 2016-07-11 21:09:19 |
Do more tests and resync some with the reality | db9bb136ff176006cbb8f8848309b8adbf98d630 | Catalin(ux) M. BOIE | 2016-07-11 04:07:38 |
Improved user cache to not have null elements in JSON | d6b75a2cc4830cfb8dfb92e911f1e5a41c2023bc | Catalin(ux) M. BOIE | 2016-07-11 04:06:25 |
Allow rights to have numbers and _ in name | 4f5c38389bc98e2dcb60d36359917c33820e5779 | Catalin(ux) M. BOIE | 2016-07-11 04:05:40 |
Allow strange chars in cache names | 00b05d99d3d3cf0229249718d2482af40f063972 | Catalin(ux) M. BOIE | 2016-07-11 04:04:08 |
Small improvements to builder and worker | 08f9bc668f7f192af61868bebd644bea64b6aedd | Catalin(ux) M. BOIE | 2016-07-11 04:01:47 |
SELinux improvements to support the builder | a2b52360b43be53786ee5d68c9fcb2db14f29c0c | Catalin(ux) M. BOIE | 2016-07-11 04:00:57 |
Document docker on Download web section | 5d4ece50d6b4dc3d4902afd9264a45834ceb3592 | Catalin(ux) M. BOIE | 2016-07-11 03:54:31 |
Doc: restore context for rc.local | eb5fa1cab84737e3440cfbca147d50859b8f9a53 | Catalin(ux) M. BOIE | 2016-07-07 04:09:23 |
Fixed small bug preventing e-mail to show in report | 26d884b3a332f3c3b241c194912b9653749a9427 | Catalin(ux) M. BOIE | 2016-07-07 03:37:23 |
Do not clobber the cron file | 5c68384676d9b8087255dda3b62e3588fc50e6c7 | Catalin(ux) M. BOIE | 2016-07-06 22:03:58 |
When using rg_json_encode, no quotes needed. | c4b7693a81e593918f8c06408f16b4884a92773b | Catalin(ux) M. BOIE | 2016-07-06 05:21:00 |
Remove summary from tables because violates HTML5 specs. :( | 11865f18e979f3849dbb265e5c5350f4a638088b | Catalin(ux) M. BOIE | 2016-07-06 05:00:11 |
Bump version to 0.55 | 58652b8250a867c0f4e9e3a9c76737443f242b36 | Catalin(ux) M. BOIE | 2016-07-06 04:48:24 |
Big commit of a lot of unrelated changes. Shame on me! | e503666df79ef1553d0bb7ffd1d12a6b62748b1c | Catalin(ux) M. BOIE | 2016-07-06 04:44:43 |
Do not free resources if query fails. | 57baca81e9087a00a8e2e1807c932de2fb9769c4 | Catalin(ux) M. BOIE | 2016-06-26 11:47:09 |
Packaging changes: prepared for Debian build | c32cb09dc84615f4984ce5f8fac4064accbeeb28 | Catalin(ux) M. BOIE | 2016-06-12 05:59:14 |
webhooks - rename Name to Type | 7d774d4818950b3d3916e834b0dde3081b90960e | Catalin(ux) M. BOIE | 2016-05-08 11:36:45 |
Correct license for spec file (Affero -> A) | 3635ec1e7b416524ad15e06c884b4546600d68e4 | Catalin(ux) M. BOIE | 2016-05-08 11:09:01 |
Bump version to 0.54 | a6f90aaaedcaa67073408100b6a0abd5c7ddd6fa | Catalin(ux) M. BOIE | 2016-05-08 11:06:23 |
File inc/admin.inc.php changed (mode: 100644) (index 06851c6..46212d5) | |||
... | ... | function rg_init($db, $rg) | |
223 | 223 | $rg['init']['pass2'] = rg_var_str('init::pass2'); | $rg['init']['pass2'] = rg_var_str('init::pass2'); |
224 | 224 | $rg['init']['session_time'] = rg_var_uint('init::session_time'); | $rg['init']['session_time'] = rg_var_uint('init::session_time'); |
225 | 225 | $rg['init']['confirmed'] = 1; /* = no need to confirm */ | $rg['init']['confirmed'] = 1; /* = no need to confirm */ |
226 | $rg['init']['ask_for_email_confirmation'] = 0; | ||
226 | 227 | ||
227 | 228 | if (!rg_valid_referer()) { | if (!rg_valid_referer()) { |
228 | 229 | $errmsg[] = "invalid referer; try again"; | $errmsg[] = "invalid referer; try again"; |
File inc/dispatch/dispatch.php changed (mode: 100644) (index 98b3869..249cd4f) | |||
... | ... | case 'doc': | |
121 | 121 | } | } |
122 | 122 | break; | break; |
123 | 123 | ||
124 | case 'ask_email_conf': | ||
125 | $r = rg_user_ask_for_email_confirmation($db, $rg['login_ui']['uid']); | ||
126 | if ($r === TRUE) | ||
127 | $body .= rg_template('user/email_conf.html', $rg, TRUE /*xss*/); | ||
128 | else | ||
129 | $body .= rg_template('user/email_conf_error.html', $rg, TRUE /*xss*/); | ||
130 | break; | ||
131 | |||
124 | 132 | default: // can be the main page or user page or repo page | default: // can be the main page or user page or repo page |
125 | 133 | rg_log("DEBUG:paras=" . rg_array2string($paras)); | rg_log("DEBUG:paras=" . rg_array2string($paras)); |
126 | 134 | $type = empty($paras) ? "" : $paras[0]; | $type = empty($paras) ? "" : $paras[0]; |
File inc/user.inc.php changed (mode: 100644) (index bdf7251..2dc469f) | |||
... | ... | $rg_user_functions = array( | |
47 | 47 | 2001 => "rg_user_event_login", | 2001 => "rg_user_event_login", |
48 | 48 | 2002 => "rg_user_event_notify_user", | 2002 => "rg_user_event_notify_user", |
49 | 49 | 2005 => "rg_user_event_rename", | 2005 => "rg_user_event_rename", |
50 | 2006 => "rg_user_link_by_name" | ||
50 | 2006 => "rg_user_link_by_name", | ||
51 | 'ask-email-confirmation' => 'rg_user_event_ask_email_confirmation' | ||
51 | 52 | ); | ); |
52 | 53 | rg_event_register_functions($rg_user_functions); | rg_event_register_functions($rg_user_functions); |
53 | 54 | ||
55 | /* | ||
56 | * Ask for e-mail confirmation | ||
57 | */ | ||
58 | function rg_user_event_ask_email_confirmation($db, $ev) | ||
59 | { | ||
60 | rg_log('rg_user_event_ask_email_confirmation: ev=' | ||
61 | . rg_array2string($ev)); | ||
62 | |||
63 | if (!isset($ev['ui']['email'])) { | ||
64 | $ev['ui'] = rg_user_info($db, $ev['ui']['uid'], '', ''); | ||
65 | if ($ev['ui']['exists'] != 1) | ||
66 | return FALSE; | ||
67 | } | ||
68 | |||
69 | rg_mail_template('mail/user/econf', $ev); | ||
70 | |||
71 | return array(); | ||
72 | } | ||
73 | |||
54 | 74 | /* | /* |
55 | 75 | * Event for adding a new user | * Event for adding a new user |
56 | 76 | */ | */ |
... | ... | function rg_user_event_new($db, $event) | |
58 | 78 | { | { |
59 | 79 | $ret = array(); | $ret = array(); |
60 | 80 | ||
61 | $event['op'] = "new"; | ||
81 | //rg_log_ml('DEBUG: user_event_new: event: ' . print_r($event, TRUE)); | ||
82 | |||
83 | $event['op'] = 'new'; | ||
84 | |||
62 | 85 | // create link by name | // create link by name |
63 | 86 | $ret[] = array_merge($event, array("category" => 2006, "prio" => 500)); | $ret[] = array_merge($event, array("category" => 2006, "prio" => 500)); |
87 | |||
64 | 88 | // notify user | // notify user |
65 | 89 | $ret[] = array_merge($event, array("category" => 2002, "prio" => 200)); | $ret[] = array_merge($event, array("category" => 2002, "prio" => 200)); |
66 | 90 | ||
... | ... | function rg_user_edit($db, $d) | |
461 | 485 | ||
462 | 486 | $ret = FALSE; | $ret = FALSE; |
463 | 487 | while (1) { | while (1) { |
488 | $add = $d['uid'] == 0; | ||
489 | |||
464 | 490 | if (rg_user_ok($d['username']) !== TRUE) | if (rg_user_ok($d['username']) !== TRUE) |
465 | 491 | break; | break; |
466 | 492 | ||
467 | 493 | // TODO: check rights | // TODO: check rights |
468 | 494 | // TODO - check if user is allowed to give passed rights | // TODO - check if user is allowed to give passed rights |
469 | 495 | ||
496 | if ($d['ask_for_email_confirmation'] == 1) | ||
497 | $d['confirmed'] = 0; | ||
498 | |||
470 | 499 | if (($d['confirmed'] == 0) | if (($d['confirmed'] == 0) |
471 | 500 | && ($rg_account_email_confirm == 0)) { | && ($rg_account_email_confirm == 0)) { |
472 | 501 | // no need to confirm account | // no need to confirm account |
... | ... | function rg_user_edit($db, $d) | |
486 | 515 | ||
487 | 516 | $d['itime'] = time(); | $d['itime'] = time(); |
488 | 517 | ||
489 | if ($d['uid'] == 0) { // add | ||
518 | if ($add) { | ||
490 | 519 | if (rg_user_pass_ok($d['pass']) !== TRUE) | if (rg_user_pass_ok($d['pass']) !== TRUE) |
491 | 520 | break; | break; |
492 | 521 | ||
... | ... | function rg_user_edit($db, $d) | |
519 | 548 | . ", rights = @@rights@@" | . ", rights = @@rights@@" |
520 | 549 | . ", session_time = @@session_time@@" | . ", session_time = @@session_time@@" |
521 | 550 | . ", plan_id = @@plan_id@@" | . ", plan_id = @@plan_id@@" |
551 | . ", confirm_token = @@confirm_token@@" | ||
522 | 552 | . $salt_pass_add | . $salt_pass_add |
523 | . " WHERE uid = @@uid@@" | ||
524 | . " RETURNING uid"; | ||
553 | . " WHERE uid = @@uid@@"; | ||
525 | 554 | } | } |
526 | 555 | ||
527 | 556 | $res = rg_sql_query_params($db, $sql, $d); | $res = rg_sql_query_params($db, $sql, $d); |
528 | 557 | if ($res === FALSE) { | if ($res === FALSE) { |
529 | rg_user_set_error("cannot insert/update user (" . rg_sql_error() . ")"); | ||
558 | rg_user_set_error('cannot insert/update user info'); | ||
530 | 559 | break; | break; |
531 | 560 | } | } |
532 | $row = rg_sql_fetch_array($res); | ||
561 | if ($add) { | ||
562 | $row = rg_sql_fetch_array($res); | ||
563 | $d['uid'] = $row['uid']; | ||
564 | } | ||
533 | 565 | rg_sql_free_result($res); | rg_sql_free_result($res); |
534 | 566 | ||
535 | if ($d['uid'] == 0) { // add | ||
536 | $d['uid'] = $row['uid']; | ||
567 | if ($add) { | ||
537 | 568 | rg_cache_set('user' . '::' . $d['uid'] . '::' . 'info', | rg_cache_set('user' . '::' . $d['uid'] . '::' . 'info', |
538 | 569 | $d, RG_SOCKET_NO_WAIT); | $d, RG_SOCKET_NO_WAIT); |
539 | 570 | ||
... | ... | function rg_user_edit($db, $d) | |
544 | 575 | ); | ); |
545 | 576 | $r = rg_event_add($db, $event); | $r = rg_event_add($db, $event); |
546 | 577 | if ($r === FALSE) { | if ($r === FALSE) { |
547 | rg_user_set_error("Cannot add event!"); | ||
578 | rg_user_set_error('cannot add event'); | ||
548 | 579 | break; | break; |
549 | 580 | } | } |
550 | 581 | rg_event_signal_daemon("", 0); | rg_event_signal_daemon("", 0); |
... | ... | function rg_user_edit($db, $d) | |
555 | 586 | unset($d['pass2']); // not needed in cache | unset($d['pass2']); // not needed in cache |
556 | 587 | rg_cache_merge('user' . '::' . $d['uid'] | rg_cache_merge('user' . '::' . $d['uid'] |
557 | 588 | . '::' . 'info', $d, RG_SOCKET_NO_WAIT); | . '::' . 'info', $d, RG_SOCKET_NO_WAIT); |
589 | |||
590 | if ($d['ask_for_email_confirmation'] == 1) { | ||
591 | $r = rg_user_ask_for_email_confirmation($db, $d['uid']); | ||
592 | if ($r === FALSE) { | ||
593 | rg_user_set_error('cannot add event'); | ||
594 | break; | ||
595 | } | ||
596 | } | ||
558 | 597 | } | } |
559 | 598 | ||
560 | 599 | // TODO: should we cache here the user_by_uid and user_by_name | // TODO: should we cache here the user_by_uid and user_by_name |
561 | 600 | ||
562 | $ret = $row['uid']; | ||
601 | $ret = $d['uid']; | ||
563 | 602 | break; | break; |
564 | 603 | } | } |
565 | 604 | ||
... | ... | function rg_user_confirm($db, $token) | |
1390 | 1429 | } | } |
1391 | 1430 | ||
1392 | 1431 | $params = array("token" => $token); | $params = array("token" => $token); |
1393 | $sql = "SELECT uid FROM users WHERE confirm_token = @@token@@"; | ||
1432 | $sql = "SELECT uid, confirmed FROM users WHERE confirm_token = @@token@@"; | ||
1394 | 1433 | $res = rg_sql_query_params($db, $sql, $params); | $res = rg_sql_query_params($db, $sql, $params); |
1395 | 1434 | if ($res === FALSE) { | if ($res === FALSE) { |
1396 | 1435 | rg_user_set_error("cannot search for token (" . rg_sql_error() . ")"); | rg_user_set_error("cannot search for token (" . rg_sql_error() . ")"); |
... | ... | function rg_user_confirm($db, $token) | |
1406 | 1445 | } | } |
1407 | 1446 | $uid = $row['uid']; | $uid = $row['uid']; |
1408 | 1447 | ||
1409 | // "< 2" because we mark with "1" if "no need to confirm" | ||
1410 | $params = array("confirmed" => $now, "uid" => $uid); | ||
1411 | $sql = "UPDATE users SET confirmed = @@confirmed@@" | ||
1412 | . " WHERE uid = @@uid@@" | ||
1413 | . " AND confirmed < 2"; | ||
1414 | $res = rg_sql_query_params($db, $sql, $params); | ||
1415 | if ($res === FALSE) { | ||
1416 | rg_user_set_error("cannot update confirmed (" . rg_sql_error() . ")"); | ||
1417 | break; | ||
1418 | } | ||
1419 | rg_sql_free_result($res); | ||
1448 | if ($row['confirmed'] < 2) { | ||
1449 | // "< 2" because we mark with "1" if "no need to confirm" | ||
1450 | $params = array("confirmed" => $now, "uid" => $uid); | ||
1451 | $sql = "UPDATE users SET confirmed = @@confirmed@@" | ||
1452 | . " WHERE uid = @@uid@@" | ||
1453 | . " AND confirmed < 2"; | ||
1454 | $res = rg_sql_query_params($db, $sql, $params); | ||
1455 | if ($res === FALSE) { | ||
1456 | rg_user_set_error('cannot set confirmed'); | ||
1457 | break; | ||
1458 | } | ||
1459 | rg_sql_free_result($res); | ||
1420 | 1460 | ||
1421 | rg_cache_set('user' . '::' . $uid . '::' . 'info' | ||
1422 | . '::' . 'confirmed', $now, RG_SOCKET_NO_WAIT); | ||
1461 | rg_cache_set('user' . '::' . $uid . '::' . 'info' | ||
1462 | . '::' . 'confirmed', $now, RG_SOCKET_NO_WAIT); | ||
1463 | } | ||
1423 | 1464 | ||
1424 | 1465 | $ret = $uid; | $ret = $uid; |
1425 | 1466 | break; | break; |
... | ... | function rg_user_edit_high_level($db, &$rg) | |
1565 | 1606 | $ui['rights'] = "C"; // TODO | $ui['rights'] = "C"; // TODO |
1566 | 1607 | $ui['plan_id'] = rg_var_uint("plan_id"); | $ui['plan_id'] = rg_var_uint("plan_id"); |
1567 | 1608 | $ui['session_time'] = rg_var_uint("session_time"); | $ui['session_time'] = rg_var_uint("session_time"); |
1568 | $ui['confirm_token'] = rg_id(20); | ||
1569 | 1609 | $ui['confirmed'] = 0; | $ui['confirmed'] = 0; |
1570 | 1610 | if ($rg['no_tos'] == 1) | if ($rg['no_tos'] == 1) |
1571 | 1611 | $ui['tos'] = 1; | $ui['tos'] = 1; |
1572 | 1612 | else | else |
1573 | 1613 | $ui['tos'] = rg_var_uint('tos'); | $ui['tos'] = rg_var_uint('tos'); |
1574 | 1614 | ||
1615 | $ui['ask_for_email_confirmation'] = 0; | ||
1616 | $ui['confirm_token'] = rg_id(20); | ||
1617 | if ($rg['target_ui']['uid'] > 0) { | ||
1618 | if (strcasecmp($rg['target_ui']['email'], $ui['email']) != 0) { | ||
1619 | $ui['ask_for_email_confirmation'] = 1; | ||
1620 | } else { | ||
1621 | // reuse | ||
1622 | $ui['confirm_token'] = $rg['target_ui']['confirm_token']; | ||
1623 | } | ||
1624 | } | ||
1625 | |||
1575 | 1626 | if ($ui['tos'] != 1) { | if ($ui['tos'] != 1) { |
1576 | 1627 | $errmsg[] = rg_template('user/tos_deny.html', $rg, TRUE /*xss*/); | $errmsg[] = rg_template('user/tos_deny.html', $rg, TRUE /*xss*/); |
1577 | 1628 | break; | break; |
... | ... | function rg_user_api($db, $a) | |
1726 | 1777 | return $ret; | return $ret; |
1727 | 1778 | } | } |
1728 | 1779 | ||
1780 | /* | ||
1781 | * Add an ask-for-email-confirmation event to queue | ||
1782 | */ | ||
1783 | function rg_user_ask_for_email_confirmation($db, $uid) | ||
1784 | { | ||
1785 | $ev = array( | ||
1786 | 'category' => 'ask-email-confirmation', | ||
1787 | 'prio' => 200, | ||
1788 | 'ui' => array('uid' => $uid), | ||
1789 | 'base_url' => rg_base_url() | ||
1790 | ); | ||
1791 | $r = rg_event_add($db, $ev); | ||
1792 | if ($r !== TRUE) | ||
1793 | return FALSE; | ||
1794 | |||
1795 | rg_event_signal_daemon('', 0); | ||
1796 | return TRUE; | ||
1797 | } | ||
1798 | |||
1729 | 1799 | ?> | ?> |
File inc/user/confirm.php changed (mode: 100644) (index e851c16..b289e84) | |||
... | ... | $_confirm = ""; | |
7 | 7 | ||
8 | 8 | $uid = rg_user_confirm($db, $token); | $uid = rg_user_confirm($db, $token); |
9 | 9 | if ($uid !== FALSE) { | if ($uid !== FALSE) { |
10 | $_confirm = rg_template('user/good_token.html', $rg, TRUE /*xss*/); | ||
11 | |||
10 | 12 | // auto-login | // auto-login |
11 | 13 | $lock_ip = 0; // TODO: What should we do here? Present a form? | $lock_ip = 0; // TODO: What should we do here? Present a form? |
12 | if (rg_user_auto_login($db, $uid, $lock_ip, $rg['login_ui'])) { | ||
13 | $url = rg_re_userpage($rg['login_ui']); | ||
14 | rg_redirect($url); | ||
15 | } | ||
14 | rg_user_auto_login($db, $uid, $lock_ip, $rg['login_ui']); | ||
15 | } else { | ||
16 | // error | ||
17 | $_confirm = rg_template('user/bad_token.html', $rg, TRUE /*xss*/); | ||
16 | 18 | } | } |
17 | 19 | ||
18 | // error | ||
19 | $_confirm = rg_template("user/bad_token.html", $rg, TRUE /* xss */); | ||
20 | |||
21 | 20 | ?> | ?> |
File inc/user/home-page.php changed (mode: 100644) (index 67b5d07..affe658) | |||
... | ... | $_home .= rg_repo_list($db, $rg, '', $rg['page_ui']['uid']); | |
23 | 23 | $hints = array(); | $hints = array(); |
24 | 24 | ||
25 | 25 | if ($rg['page_ui']['uid'] == $rg['login_ui']['uid']) { | if ($rg['page_ui']['uid'] == $rg['login_ui']['uid']) { |
26 | if (empty($rg['login_ui']['email'])) | ||
27 | $hints[]['HTML:hint'] = rg_template('user/hints/email_empty.html', | ||
28 | $rg, TRUE /*xss*/); | ||
29 | else if ($rg['login_ui']['confirmed'] < 10) | ||
30 | $hints[]['HTML:hint'] = rg_template('user/hints/econf.html', | ||
31 | $rg, TRUE /*xss*/); | ||
32 | |||
26 | 33 | $r = rg_totp_enrolled($db, $rg['login_ui']['uid']); | $r = rg_totp_enrolled($db, $rg['login_ui']['uid']); |
27 | 34 | if (($r['ok'] == 1) && ($r['enrolled'] == 0)) | if (($r['ok'] == 1) && ($r['enrolled'] == 0)) |
28 | 35 | $hints[]['HTML:hint'] = rg_template('user/hints/totp.html', | $hints[]['HTML:hint'] = rg_template('user/hints/totp.html', |
File root/themes/default/mail/user/econf.body.txt added (mode: 100644) (index 0000000..14933fe) | |||
1 | Dear @@if("@@ui::realname@@" != ""){{@@ui::realname@@}}{{@@ui::username@@}}, | ||
2 | |||
3 | Please confirm your e-mail address by follow the following link: | ||
4 | @@base_url@@/op/confirm/@@ui::confirm_token@@ | ||
5 | |||
6 | Thank you! | ||
7 | |||
8 | -- | ||
9 | RocketGit Team | ||
10 | http://rocketgit.com/ |
File root/themes/default/mail/user/econf.head.txt copied from file root/themes/default/mail/admin/report1.head.txt (similarity 100%) |
File root/themes/default/mail/user/econf.subj.txt added (mode: 100644) (index 0000000..5b3b09a) | |||
1 | RocketGit e-mail confirmation |
File root/themes/default/repo/list/nodata.html changed (mode: 100644) (index 1b6b4c6..d752a71) | |||
1 | 1 | <div class="mess ok"> | <div class="mess ok"> |
2 | 2 | No repositories found. | No repositories found. |
3 | Go to <a href="/op/repo/create">My repositories / Create</a> to add one. | ||
4 | 3 | </div> | </div> |
File root/themes/default/user/email_conf_error.html added (mode: 100644) (index 0000000..e9e0851) | |||
1 | <div class="mess error"> | ||
2 | Could not send the e-mail; please try again later. | ||
3 | </div> |
File root/themes/default/user/good_token.html added (mode: 100644) (index 0000000..1f8adff) | |||
1 | <div class="mess ok"> | ||
2 | Your e-mail is confirmed now. | ||
3 | </div> |
File root/themes/default/user/hints/econf.html added (mode: 100644) (index 0000000..3ed9589) | |||
1 | <br /> | ||
2 | Your have <b>not</b> confirmed your e-mail address. You will not be able | ||
3 | to receive notifications and to recover a lost password. | ||
4 | Follow this <a href="/op/ask_email_conf">link</a> to receive a new | ||
5 | ask-for-confirmation e-mail. |
File root/themes/default/user/hints/empty_email.html added (mode: 100644) (index 0000000..57a9430) | |||
1 | <br /> | ||
2 | Your have <b>not</b> added an e-mail address. You will not be able | ||
3 | to receive notifications and to recover a lost password. | ||
4 | Please go to <a href="/op/settings">Settings</a> and set one. |
File root/themes/default/user/hints/login.html changed (mode: 100644) (index 5c98b01..7e4604b) | |||
1 | 1 | <br /> | <br /> |
2 | 2 | If you lose your password, 2fa device or all scratch codes, | If you lose your password, 2fa device or all scratch codes, |
3 | just run <b>rg_change_pass</b>, as root, on your rocketgit machine.<br /> | ||
3 | just run <b>rg_change_pass</b>, as root, on your rocketgit machine. |
File root/themes/default/user/hints/totp.html changed (mode: 100644) (index 186f1fb..58ccb19) | |||
... | ... | two-factor authentication | |
5 | 5 | </a> | </a> |
6 | 6 | for extra security. | for extra security. |
7 | 7 | Go to <a href="/op/settings/totp/info">Settings / Login tokens</a> to | Go to <a href="/op/settings/totp/info">Settings / Login tokens</a> to |
8 | activate it.<br /> | ||
8 | activate it. |
File tests/helpers.inc.php changed (mode: 100644) (index ad2b5ea..f8a70b9) | |||
... | ... | function rg_test_create_user($db, &$rg_ui) | |
35 | 35 | $new['pass2'] = 'pass-' . $_user_id; | $new['pass2'] = 'pass-' . $_user_id; |
36 | 36 | $new['disk_used_mb'] = 0; | $new['disk_used_mb'] = 0; |
37 | 37 | $new['last_ip'] = '?'; | $new['last_ip'] = '?'; |
38 | $new['ask_for_email_confirmation'] = 0; | ||
38 | 39 | $_user_id++; | $_user_id++; |
39 | 40 | ||
40 | 41 | // Delete old user | // Delete old user |
File tests/user.php changed (mode: 100644) (index f516f82..1c66ec0) | |||
... | ... | $_u['session_time'] = 3600; | |
58 | 58 | $_u['confirm_token'] = ""; | $_u['confirm_token'] = ""; |
59 | 59 | $_u['confirmed'] = 0; | $_u['confirmed'] = 0; |
60 | 60 | $_u['plan_id'] = 1000; | $_u['plan_id'] = 1000; |
61 | $_u['ask_for_email_confirmation'] = 0; | ||
61 | 62 | $uid = rg_user_edit($db, $_u); | $uid = rg_user_edit($db, $_u); |
62 | 63 | if ($uid === FALSE) { | if ($uid === FALSE) { |
63 | 64 | rg_log("Cannot add user (" . rg_user_error() . ")!"); | rg_log("Cannot add user (" . rg_user_error() . ")!"); |
... | ... | $_u['session_time'] = 3600; | |
185 | 186 | $_u['confirm_token'] = ""; | $_u['confirm_token'] = ""; |
186 | 187 | $_u['confirmed'] = 0; | $_u['confirmed'] = 0; |
187 | 188 | $_u['plan_id'] = 1000; | $_u['plan_id'] = 1000; |
189 | $_u['ask_for_email_confirmation'] = 0; | ||
188 | 190 | $uid5 = rg_user_edit($db, $_u); | $uid5 = rg_user_edit($db, $_u); |
189 | 191 | if ($uid5 === FALSE) { | if ($uid5 === FALSE) { |
190 | 192 | rg_log("Cannot add user5 (" . rg_user_error() . ")!"); | rg_log("Cannot add user5 (" . rg_user_error() . ")!"); |