Changeset 3175818
- Timestamp:
- 10/25/2024 06:27:28 PM (17 months ago)
- Location:
- ejabberd-account-tools/trunk
- Files:
-
- 2 edited
-
ejabberd-account-tools.pot (modified) (23 diffs)
-
includes/register.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ejabberd-account-tools/trunk/ejabberd-account-tools.pot
r2681972 r3175818 3 3 msgstr "" 4 4 "Project-Id-Version: Ejabberd Account Tools\n" 5 "POT-Creation-Date: 202 2-02-20 12:23+0100\n"5 "POT-Creation-Date: 2024-10-25 20:16+0200\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: \n" … … 12 12 "Content-Transfer-Encoding: 8bit\n" 13 13 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 "X-Generator: Poedit 3. 0.1\n"14 "X-Generator: Poedit 3.5\n" 15 15 "X-Poedit-Basepath: .\n" 16 16 "X-Poedit-SourceCharset: UTF-8\n" … … 189 189 #, php-format 190 190 msgid "" 191 "Form to change private email address is temporarily disabled, click <a href="192 " \"%s\">here</a> to turn it on again."191 "Form to change private email address is temporarily disabled, click <a " 192 "href=\"%s\">here</a> to turn it on again." 193 193 msgstr "" 194 194 … … 210 210 #, php-format 211 211 msgid "" 212 "Web Presence configuration form is temporarily disabled, click <a href=\"%s"213 " \">here</a> to turn it on again."212 "Web Presence configuration form is temporarily disabled, click <a " 213 "href=\"%s\">here</a> to turn it on again." 214 214 msgstr "" 215 215 … … 238 238 msgstr "" 239 239 240 #: includes/admin-settings.php:215 includes/register.php:1 70240 #: includes/admin-settings.php:215 includes/register.php:180 241 241 msgid "Username" 242 242 msgstr "" … … 248 248 #: includes/admin-settings.php:221 includes/admin-settings.php:286 249 249 #: includes/change_email.php:112 includes/delete_account.php:77 250 #: includes/delete_account.php:105 includes/register.php:1 75250 #: includes/delete_account.php:105 includes/register.php:185 251 251 #: includes/reset_password.php:89 includes/webpresence.php:141 252 252 msgid "Password" … … 558 558 msgstr "" 559 559 560 #: includes/admin-settings.php:53 5560 #: includes/admin-settings.php:538 561 561 msgid "" 562 562 "Then configure ReST API url and authorization data, finally put shortcodes " … … 564 564 msgstr "" 565 565 566 #: includes/admin-settings.php:5 37566 #: includes/admin-settings.php:540 567 567 msgid "Form to register a new account." 568 568 msgstr "" 569 569 570 #: includes/admin-settings.php:5 38570 #: includes/admin-settings.php:541 571 571 msgid "Form to change / add private email address." 572 572 msgstr "" 573 573 574 #: includes/admin-settings.php:5 39574 #: includes/admin-settings.php:542 575 575 msgid "Form to reset account password." 576 576 msgstr "" 577 577 578 #: includes/admin-settings.php:54 0578 #: includes/admin-settings.php:543 579 579 msgid "Form to delete account." 580 580 msgstr "" 581 581 582 #: includes/admin-settings.php:54 1582 #: includes/admin-settings.php:544 583 583 msgid "Web Presence configuration form." 584 584 msgstr "" 585 585 586 #: includes/admin-settings.php:56 0586 #: includes/admin-settings.php:563 587 587 msgid "The cache has been successfully cleared." 588 588 msgstr "" 589 589 590 #: includes/admin-settings.php:56 2includes/admin-tools.php:269590 #: includes/admin-settings.php:565 includes/admin-tools.php:269 591 591 #: includes/admin-tools.php:326 includes/admin-tools.php:381 592 592 #: includes/admin-tools.php:416 includes/admin-tools.php:472 … … 596 596 #: includes/delete_account.php:254 includes/delete_account.php:255 597 597 #: includes/delete_account.php:348 includes/delete_account.php:349 598 #: includes/functions.php: 201 includes/functions.php:202599 #: includes/functions.php:2 93 includes/functions.php:294600 #: includes/functions.php:32 9 includes/functions.php:330601 #: includes/register.php:43 includes/register.php:44 includes/register.php:3 84602 #: includes/register.php:3 85includes/reset_password.php:33598 #: includes/functions.php:197 includes/functions.php:198 599 #: includes/functions.php:289 includes/functions.php:290 600 #: includes/functions.php:325 includes/functions.php:326 601 #: includes/register.php:43 includes/register.php:44 includes/register.php:390 602 #: includes/register.php:391 includes/reset_password.php:33 603 603 #: includes/reset_password.php:34 includes/reset_password.php:272 604 #: includes/reset_password.php:273 includes/reset_password.php:3 56605 #: includes/reset_password.php:3 57includes/webpresence.php:24604 #: includes/reset_password.php:273 includes/reset_password.php:360 605 #: includes/reset_password.php:361 includes/webpresence.php:24 606 606 #: includes/webpresence.php:25 includes/webpresence.php:274 607 607 #: includes/webpresence.php:275 … … 678 678 #: includes/change_email.php:220 includes/change_email.php:235 679 679 #: includes/delete_account.php:191 includes/delete_account.php:206 680 #: includes/delete_account.php:304 includes/functions.php:2 70681 #: includes/register.php: 298includes/webpresence.php:235680 #: includes/delete_account.php:304 includes/functions.php:266 681 #: includes/register.php:302 includes/webpresence.php:235 682 682 #: includes/webpresence.php:244 683 683 msgid "Server is temporarily unavailable, please try again in a moment." … … 690 690 691 691 #: includes/admin-tools.php:208 includes/change_email.php:187 692 #: includes/register.php:2 75692 #: includes/register.php:285 693 693 msgid "Email address seems invalid, change it and try again." 694 694 msgstr "" 695 695 696 696 #: includes/admin-tools.php:212 includes/change_email.php:192 697 #: includes/register.php:2 80697 #: includes/register.php:290 698 698 msgid "" 699 699 "Disposable emails addresses are forbidden, please change entered email " … … 831 831 832 832 #: includes/change_email.php:173 includes/delete_account.php:156 833 #: includes/delete_account.php:294 includes/register.php:2 43833 #: includes/delete_account.php:294 includes/register.php:253 834 834 #: includes/reset_password.php:156 includes/reset_password.php:312 835 835 #: includes/webpresence.php:225 … … 838 838 839 839 #: includes/change_email.php:180 includes/delete_account.php:163 840 #: includes/functions.php:2 42 includes/register.php:256840 #: includes/functions.php:238 includes/register.php:266 841 841 #: includes/reset_password.php:163 842 842 msgid "Captcha validation error, try again." … … 846 846 #: includes/change_email.php:226 includes/delete_account.php:170 847 847 #: includes/delete_account.php:183 includes/delete_account.php:197 848 #: includes/functions.php:24 9 includes/functions.php:262848 #: includes/functions.php:245 includes/functions.php:258 849 849 msgid "Invalid username or password, correct them and try again." 850 850 msgstr "" … … 936 936 msgstr "" 937 937 938 #: includes/delete_account.php:319 includes/functions.php:1 81938 #: includes/delete_account.php:319 includes/functions.php:177 939 939 #: includes/reset_password.php:191 includes/reset_password.php:206 940 #: includes/reset_password.php:32 2940 #: includes/reset_password.php:328 941 941 msgid "Server is temporarily unavailable." 942 942 msgstr "" … … 950 950 msgstr "" 951 951 952 #: includes/functions.php:16 5includes/register.php:28952 #: includes/functions.php:161 includes/register.php:28 953 953 msgid "Username doesn't meet the requirements." 954 954 msgstr "" 955 955 956 #: includes/functions.php:16 9956 #: includes/functions.php:165 957 957 msgid "Username contains forbidden words." 958 958 msgstr "" 959 959 960 #: includes/functions.php:18 6960 #: includes/functions.php:182 961 961 msgid "Selected username is available." 962 962 msgstr "" 963 963 964 #: includes/functions.php:1 91964 #: includes/functions.php:187 965 965 msgid "Selected username is already registered." 966 966 msgstr "" 967 967 968 #: includes/functions.php:19 7 includes/register.php:376968 #: includes/functions.php:193 includes/register.php:382 969 969 msgid "Invalid host name, try again." 970 970 msgstr "" 971 971 972 #: includes/functions.php:27 6972 #: includes/functions.php:272 973 973 msgid "Invalid login or password, correct them and try again." 974 974 msgstr "" 975 975 976 #: includes/functions.php:28 6976 #: includes/functions.php:282 977 977 msgid "Signed in to the account, redirecting..." 978 978 msgstr "" … … 1018 1018 msgstr "" 1019 1019 1020 #: includes/register.php:97 includes/register.php:2 491020 #: includes/register.php:97 includes/register.php:259 1021 1021 msgid "You can't register another account so quickly. Please try again later." 1022 1022 msgstr "" 1023 1023 1024 #: includes/register.php:10 71024 #: includes/register.php:109 1025 1025 msgid "" 1026 1026 "Account activation failed because server is temporarily unavailable. Please " … … 1028 1028 msgstr "" 1029 1029 1030 #: includes/register.php:14 01030 #: includes/register.php:142 1031 1031 #, php-format 1032 1032 msgid "Account %s has been successfully activated." 1033 1033 msgstr "" 1034 1034 1035 #: includes/register.php:14 41035 #: includes/register.php:146 1036 1036 msgid "" 1037 1037 "Unexpected error occurred while attempting to activate account. Please try " … … 1039 1039 msgstr "" 1040 1040 1041 #: includes/register.php:152 1041 #: includes/register.php:154 1042 #, php-format 1043 msgid "Account %s has already been activated." 1044 msgstr "" 1045 1046 #: includes/register.php:162 1042 1047 msgid "" 1043 1048 "The link to activate account has expired or is not valid. Please fill the " … … 1045 1050 msgstr "" 1046 1051 1047 #: includes/register.php:1 791052 #: includes/register.php:189 1048 1053 msgid "Private email" 1049 1054 msgstr "" 1050 1055 1051 #: includes/register.php:1 841056 #: includes/register.php:194 1052 1057 msgid "Create account" 1053 1058 msgstr "" 1054 1059 1055 #: includes/register.php:2 631060 #: includes/register.php:273 1056 1061 msgid "" 1057 1062 "The selected username doesn't meet the requirements, change it and try again." 1058 1063 msgstr "" 1059 1064 1060 #: includes/register.php:2 681065 #: includes/register.php:278 1061 1066 msgid "" 1062 1067 "The selected username contains forbidden words, change it and try again." 1063 1068 msgstr "" 1064 1069 1065 #: includes/register.php:31 31070 #: includes/register.php:319 1066 1071 #, php-format 1067 1072 msgid "Confirm your new account on %s" 1068 1073 msgstr "" 1069 1074 1070 #: includes/register.php:3 141075 #: includes/register.php:320 1071 1076 #, php-format 1072 1077 msgid "" 1073 1078 "Hey %s!<br><br>You have registered the account %s with this email address. " 1074 "To complete your registration, please click on the activation link: <br><br>"1075 " %s<br><br>If you haven't registered an account, simply disregard this email."1076 " <br><br>Greetings,<br>%s"1077 msgstr "" 1078 1079 #: includes/register.php:32 01079 "To complete your registration, please click on the activation link:" 1080 "<br><br>%s<br><br>If you haven't registered an account, simply disregard " 1081 "this email.<br><br>Greetings,<br>%s" 1082 msgstr "" 1083 1084 #: includes/register.php:326 1080 1085 msgid "" 1081 1086 "An email has been sent to you to complete registration. It contains an " … … 1083 1088 msgstr "" 1084 1089 1085 #: includes/register.php:3 251090 #: includes/register.php:331 1086 1091 msgid "Failed to complete registration, please contact with the administrator." 1087 1092 msgstr "" 1088 1093 1089 #: includes/register.php:33 21094 #: includes/register.php:338 1090 1095 #, php-format 1091 1096 msgid "Account %s has been successfully registered." 1092 1097 msgstr "" 1093 1098 1094 #: includes/register.php:3 691099 #: includes/register.php:375 1095 1100 msgid "The selected username is already registered, change it and try again." 1096 1101 msgstr "" … … 1128 1133 msgid "" 1129 1134 "Hey %s!<br><br>Someone requested to change the password for your XMPP " 1130 "account %s. To complete the change, please click the following link: <br><br>"1131 " %s<br><br>If you haven't made this change, simply disregard this email."1132 " <br><br>Greetings,<br>%s"1135 "account %s. To complete the change, please click the following link:" 1136 "<br><br>%s<br><br>If you haven't made this change, simply disregard this " 1137 "email.<br><br>Greetings,<br>%s" 1133 1138 msgstr "" 1134 1139 … … 1150 1155 msgstr "" 1151 1156 1152 #: includes/reset_password.php:34 31157 #: includes/reset_password.php:347 1153 1158 msgid "The password for your account was successfully changed." 1154 1159 msgstr "" 1155 1160 1156 #: includes/reset_password.php:35 21161 #: includes/reset_password.php:356 1157 1162 msgid "The link to reset password has expired or is not valid." 1158 1163 msgstr "" -
ejabberd-account-tools/trunk/includes/register.php
r3175084 r3175818 101 101 // Code valid 102 102 if(true == ($transient = get_transient('ejabat_register_'.$request['code']))) { 103 // Try set correct password 104 $response = ejabat_get_xmpp_data('unban_account', array('user' => $transient['username'], 'host' => $transient['host'])); 105 // Server unavailable 106 if(is_null($response)) { 107 $html = '<p class="ejabat"><span class="ejabat-info ejabat-error">'.__('Account activation failed because server is temporarily unavailable. Please try again in a moment.', 'ejabberd-account-tools').'</span></p>'; 108 } 109 // Password changed 110 else if($response['code'] == 0) { 111 // Send welcome message 112 if(get_option('ejabat_welcome_msg', false)) { 113 // Get subject and body 114 $welcome_msg = apply_filters('ejabat_welcome_msg_args', array( 115 'subject' => get_option('ejabat_welcome_msg_subject'), 116 'body' => get_option('ejabat_welcome_msg_body') 117 )); 118 $welcome_msg['subject'] = htmlspecialchars(wp_strip_all_tags(do_shortcode($welcome_msg['subject']))); 119 $welcome_msg['subject'] = str_replace(array('\r\n', '\\r\\n', '\n', '\\n', '\r', '\\r'), ' ', $welcome_msg['subject']); 120 $welcome_msg['body'] = htmlspecialchars(wp_strip_all_tags(do_shortcode($welcome_msg['body']))); 121 $welcome_msg['body'] = str_replace(array('\r\n', '\\r\\n', '\n', '\\n', '\r', '\\r'), "\n", $welcome_msg['body']); 122 // Send message 123 if($welcome_msg['subject']) { 124 ejabat_get_xmpp_data('send_message', array('type' => 'normal', 'from' => $transient['host'], 'to' => $transient['username'].'@'.$transient['host'], 'subject' => $welcome_msg['subject'], 'body' => $welcome_msg['body'])); 125 } else { 126 ejabat_get_xmpp_data('send_message', array('type' => 'chat', 'from' => $transient['host'], 'to' => $transient['username'].'@'.$transient['host'], 'body' => $welcome_msg['body'])); 103 // Verify required activation 104 if(json_decode(ejabat_get_xmpp_data('get_ban_details', array('user' => $transient['username'], 'host' => $transient['host']))['body'])->reason == 'Activation required') { 105 // Try set correct password by unban account 106 $response = ejabat_get_xmpp_data('unban_account', array('user' => $transient['username'], 'host' => $transient['host'])); 107 // Server unavailable 108 if(is_null($response)) { 109 $html = '<p class="ejabat"><span class="ejabat-info ejabat-error">'.__('Account activation failed because server is temporarily unavailable. Please try again in a moment.', 'ejabberd-account-tools').'</span></p>'; 110 } 111 // Password changed 112 else if($response['code'] == 0) { 113 // Send welcome message 114 if(get_option('ejabat_welcome_msg', false)) { 115 // Get subject and body 116 $welcome_msg = apply_filters('ejabat_welcome_msg_args', array( 117 'subject' => get_option('ejabat_welcome_msg_subject'), 118 'body' => get_option('ejabat_welcome_msg_body') 119 )); 120 $welcome_msg['subject'] = htmlspecialchars(wp_strip_all_tags(do_shortcode($welcome_msg['subject']))); 121 $welcome_msg['subject'] = str_replace(array('\r\n', '\\r\\n', '\n', '\\n', '\r', '\\r'), ' ', $welcome_msg['subject']); 122 $welcome_msg['body'] = htmlspecialchars(wp_strip_all_tags(do_shortcode($welcome_msg['body']))); 123 $welcome_msg['body'] = str_replace(array('\r\n', '\\r\\n', '\n', '\\n', '\r', '\\r'), "\n", $welcome_msg['body']); 124 // Send message 125 if($welcome_msg['subject']) { 126 ejabat_get_xmpp_data('send_message', array('type' => 'normal', 'from' => $transient['host'], 'to' => $transient['username'].'@'.$transient['host'], 'subject' => $welcome_msg['subject'], 'body' => $welcome_msg['body'])); 127 } else { 128 ejabat_get_xmpp_data('send_message', array('type' => 'chat', 'from' => $transient['host'], 'to' => $transient['username'].'@'.$transient['host'], 'body' => $welcome_msg['body'])); 129 } 127 130 } 128 }129 // Activation watcher130 if(get_option('ejabat_watch_activation', false) && get_option('ejabat_watcher')) {131 $now = time();132 $watchers = explode(' ', get_option('ejabat_watcher'));133 foreach($watchers as $watcher) {134 ejabat_get_xmpp_data('send_message', array('type' => 'chat', 'from' => $transient['host'], 'to' => $watcher, 'subject' => '', 'body' => sprintf('[%s] Account %s was activated from IP address %s', wp_date('Y-m-d H:i:s', $now), $transient['username'].'@'.$transient['host'], $_SERVER['REMOTE_ADDR'])));131 // Activation watcher 132 if(get_option('ejabat_watch_activation', false) && get_option('ejabat_watcher')) { 133 $now = time(); 134 $watchers = explode(' ', get_option('ejabat_watcher')); 135 foreach($watchers as $watcher) { 136 ejabat_get_xmpp_data('send_message', array('type' => 'chat', 'from' => $transient['host'], 'to' => $watcher, 'subject' => '', 'body' => sprintf('[%s] Account %s was activated from IP address %s', wp_date('Y-m-d H:i:s', $now), $transient['username'].'@'.$transient['host'], $_SERVER['REMOTE_ADDR']))); 137 } 135 138 } 136 } 139 // Delete transient 140 delete_transient('ejabat_register_'.$request['code']); 141 // Success message 142 $html = '<p class="ejabat"><span class="ejabat-info ejabat-success">'.sprintf(__('Account %s has been successfully activated.', 'ejabberd-account-tools'),$transient['username'].'@'.$transient['host']).'</span></p>'; 143 } 144 // Unexpected error 145 else { 146 $html = '<p class="ejabat"><span class="ejabat-info ejabat-error">'.__('Unexpected error occurred while attempting to activate account. Please try again.', 'ejabberd-account-tools').'</span></p>'; 147 } 148 } 149 // Account already activated 150 else { 137 151 // Delete transient 138 152 delete_transient('ejabat_register_'.$request['code']); 139 153 // Success message 140 $html = '<p class="ejabat"><span class="ejabat-info ejabat-success">'.sprintf(__('Account %s has been successfully activated.', 'ejabberd-account-tools'),$transient['username'].'@'.$transient['host']).'</span></p>'; 141 } 142 // Unexpected error 143 else { 144 $html = '<p class="ejabat"><span class="ejabat-info ejabat-error">'.__('Unexpected error occurred while attempting to activate account. Please try again.', 'ejabberd-account-tools').'</span></p>'; 154 $html = '<p class="ejabat"><span class="ejabat-info ejabat-success">'.sprintf(__('Account %s has already been activated.', 'ejabberd-account-tools'),$transient['username'].'@'.$transient['host']).'</span></p>'; 145 155 } 146 156 }
Note: See TracChangeset
for help on using the changeset viewer.