31 $ssl_actions = array(
'dispMemberModifyPassword',
'dispMemberSignUpForm',
'dispMemberModifyInfo',
'dispMemberModifyEmailAddress',
'dispMemberGetTempPassword',
'dispMemberResendAuthMail',
'dispMemberLoginForm',
'dispMemberFindAccount',
'dispMemberLeave',
'procMemberLogin',
'procMemberModifyPassword',
'procMemberInsert',
'procMemberModifyInfo',
'procMemberFindAccount',
'procMemberModifyEmailAddress',
'procMemberResendAuthMail',
'procMemberLeave',
'procMemberFindAccountByQuestion');
47 $oDB->addIndex(
"member_group",
"idx_site_title", array(
"site_srl",
"title"),
true);
55 $config =
new stdClass;
59 $config->enable_join =
'Y';
60 $config->enable_openid =
'N';
61 if(!$config->enable_auth_mail) $config->enable_auth_mail =
'N';
62 if(!$config->image_name) $config->image_name =
'Y';
63 if(!$config->image_mark) $config->image_mark =
'Y';
64 if(!$config->profile_image) $config->profile_image =
'Y';
65 if(!$config->image_name_max_width) $config->image_name_max_width =
'90';
66 if(!$config->image_name_max_height) $config->image_name_max_height =
'20';
67 if(!$config->image_mark_max_width) $config->image_mark_max_width =
'20';
68 if(!$config->image_mark_max_height) $config->image_mark_max_height =
'20';
69 if(!$config->profile_image_max_width) $config->profile_image_max_width =
'90';
70 if(!$config->profile_image_max_height) $config->profile_image_max_height =
'90';
71 if($config->group_image_mark!=
'Y') $config->group_image_mark =
'N';
72 if(!$config->password_strength) $config->password_strength =
'normal';
74 if(!$config->password_hashing_algorithm)
77 $config->password_hashing_algorithm = $oPassword->getBestAlgorithm();
79 if(!$config->password_hashing_work_factor)
81 $config->password_hashing_work_factor = 8;
83 if(!$config->password_hashing_auto_upgrade)
85 $config->password_hashing_auto_upgrade =
'Y';
94 if(!$config->signupForm || !is_array($config->signupForm))
96 $identifier = $isNotInstall ?
'email_address' :
'user_id';
98 $config->signupForm = $oMemberAdminController->createSignupForm($identifier);
99 $config->identifier = $identifier;
104 $oMemberAdminController->_createSignupRuleset($config->signupForm);
105 $oMemberAdminController->_createLoginRuleset($config->identifier);
106 $oMemberAdminController->_createFindAccountByQuestion($config->identifier);
111 $groups = $oMemberModel->getGroups();
115 $group_args =
new stdClass;
117 $group_args->is_default =
'N';
118 $group_args->is_admin =
'Y';
119 $output = $oMemberAdminController->insertGroup($group_args);
121 $group_args =
new stdClass;
123 $group_args->is_default =
'Y';
124 $group_args->is_admin =
'N';
125 $output = $oMemberAdminController->insertGroup($group_args);
127 $group_args =
new stdClass;
129 $group_args->is_default =
'N';
130 $group_args->is_admin =
'N';
131 $oMemberAdminController->insertGroup($group_args);
135 $admin_args =
new stdClass;
136 $admin_args->is_admin =
'Y';
140 $admin_info =
Context::gets(
'password',
'nick_name',
'email_address',
'user_id');
141 if($admin_info->email_address)
143 $admin_info->user_name =
'admin';
145 $oMemberAdminController->insertAdmin($admin_info);
147 $output = $oMemberController->doLogin($admin_info->email_address);
153 foreach($module_list as $key => $val)
155 $oMemberAdminController->insertDeniedID($val->module,
'');
157 $oMemberAdminController->insertDeniedID(
'www',
'');
158 $oMemberAdminController->insertDeniedID(
'root',
'');
159 $oMemberAdminController->insertDeniedID(
'administrator',
'');
160 $oMemberAdminController->insertDeniedID(
'telnet',
'');
161 $oMemberAdminController->insertDeniedID(
'ftp',
'');
162 $oMemberAdminController->insertDeniedID(
'http',
'');
170 $oModuleController->insertTrigger(
'document.getDocumentMenu',
'member',
'controller',
'triggerGetDocumentMenu',
'after');
171 $oModuleController->insertTrigger(
'comment.getCommentMenu',
'member',
'controller',
'triggerGetCommentMenu',
'after');
186 $version_update_id = implode(
'.', array(__CLASS__,
__XE_VERSION__,
'updated'));
190 if(!is_dir(
"./files/member_extra_info"))
return true;
192 if(!is_dir(
"./files/member_extra_info/profile_image"))
return true;
194 $act = $oDB->isColumnExists(
"member_auth_mail",
"is_register");
195 if(!
$act)
return true;
197 if(!$oDB->isColumnExists(
"member_group_member",
"site_srl"))
return true;
198 if(!$oDB->isColumnExists(
"member_group",
"site_srl"))
return true;
199 if($oDB->isIndexExists(
"member_group",
"uni_member_group_title"))
return true;
202 if(!$oDB->isColumnExists(
"member_group",
"list_order"))
return true;
205 if(!$oDB->isColumnExists(
"member_group",
"image_mark"))
return true;
207 if(!$oDB->isColumnExists(
"member",
"change_password_date"))
return true;
210 if(!$oDB->isColumnExists(
"member",
"find_account_question"))
return true;
211 if(!$oDB->isColumnExists(
"member",
"find_account_answer"))
return true;
213 if(!$oDB->isColumnExists(
"member",
"list_order"))
return true;
214 if(!$oDB->isIndexExists(
"member",
"idx_list_order"))
return true;
219 if(!$config->signupForm)
return true;
221 foreach($config->signupForm as $form)
223 if($form->name ===
'email_address' && $form->isPublic !==
'N')
230 if($config->agreement)
return true;
234 $config_parse = explode(
'.', $config->skin);
235 if(count($config_parse) > 1)
237 $template_path = sprintf(
'./themes/%s/modules/member/', $config_parse[0]);
243 if(is_readable(
'./files/member_extra_info/agreement.txt'))
return true;
246 if(!
$oModuleModel->getTrigger(
'document.getDocumentMenu',
'member',
'controller',
'triggerGetDocumentMenu',
'after'))
return true;
247 if(!
$oModuleModel->getTrigger(
'comment.getCommentMenu',
'member',
'controller',
'triggerGetCommentMenu',
'after'))
return true;
252 if(!is_readable(
'./files/ruleset/insertMember.xml'))
return true;
253 if(!is_readable(
'./files/ruleset/login.xml'))
return true;
254 if(!is_readable(
'./files/ruleset/find_member_account_by_question.xml'))
return true;
256 if(
$oModuleModel->needUpdate(
'member.1.8.43.recreate_signup_ruleset'))
return true;
273 $version_update_id = implode(
'.', array(__CLASS__,
__XE_VERSION__,
'updated'));
282 if(!$oDB->isColumnExists(
"member_auth_mail",
"is_register"))
284 $oDB->addColumn(
"member_auth_mail",
"is_register",
"char", 1,
"N",
true);
287 if(!$oDB->isColumnExists(
"member_group_member",
"site_srl"))
289 $oDB->addColumn(
"member_group_member",
"site_srl",
"number", 11, 0,
true);
290 $oDB->addIndex(
"member_group_member",
"idx_site_srl",
"site_srl",
false);
292 if(!$oDB->isColumnExists(
"member_group",
"site_srl"))
294 $oDB->addColumn(
"member_group",
"site_srl",
"number", 11, 0,
true);
295 $oDB->addIndex(
"member_group",
"idx_site_title", array(
"site_srl",
"title"),
true);
297 if($oDB->isIndexExists(
"member_group",
"uni_member_group_title"))
299 $oDB->dropIndex(
"member_group",
"uni_member_group_title",
true);
303 if(!$oDB->isColumnExists(
"member_group",
"list_order"))
305 $oDB->addColumn(
"member_group",
"list_order",
"number", 11,
'',
true);
306 $oDB->addIndex(
"member_group",
"idx_list_order",
"list_order",
false);
310 if(!$oDB->isColumnExists(
"member_group",
"image_mark"))
312 $oDB->addColumn(
"member_group",
"image_mark",
"text");
315 if(!$oDB->isColumnExists(
"member",
"change_password_date"))
317 $oDB->addColumn(
"member",
"change_password_date",
"date");
322 if(!$oDB->isColumnExists(
"member",
"find_account_question"))
324 $oDB->addColumn(
"member",
"find_account_question",
"number", 11);
326 if(!$oDB->isColumnExists(
"member",
"find_account_answer"))
328 $oDB->addColumn(
"member",
"find_account_answer",
"varchar", 250);
331 if(!$oDB->isColumnExists(
"member",
"list_order"))
333 $oDB->addColumn(
"member",
"list_order",
"number", 11);
335 $args->list_order =
'member_srl';
339 if(!$oDB->isIndexExists(
"member",
"idx_list_order"))
341 $oDB->addIndex(
"member",
"idx_list_order", array(
"list_order"));
347 if($config->agreement)
349 $agreement_file =
_XE_PATH_.
'files/member_extra_info/agreement_' .
Context::get(
'lang_type') .
'.txt';
352 $config->agreement = NULL;
357 if(!$config->signupForm || !is_array($config->signupForm))
359 $identifier =
'email_address';
361 $config->signupForm = $oMemberAdminController->createSignupForm($identifier);
362 $config->identifier = $identifier;
363 unset($config->agreement);
368 foreach($config->signupForm as $form)
370 if($form->name ===
'email_address')
372 $form->isPublic =
'N';
380 $config_parse = explode(
'.', $config->skin);
381 if (count($config_parse) > 1)
383 $template_path = sprintf(
'./themes/%s/modules/member/', $config_parse[0]);
386 $config->skin = implode(
'|@|', $config_parse);
394 if(!
$oModuleModel->getTrigger(
'document.getDocumentMenu',
'member',
'controller',
'triggerGetDocumentMenu',
'after'))
395 $oModuleController->insertTrigger(
'document.getDocumentMenu',
'member',
'controller',
'triggerGetDocumentMenu',
'after');
396 if(!
$oModuleModel->getTrigger(
'comment.getCommentMenu',
'member',
'controller',
'triggerGetCommentMenu',
'after'))
397 $oModuleController->insertTrigger(
'comment.getCommentMenu',
'member',
'controller',
'triggerGetCommentMenu',
'after');
399 if(is_readable(
'./files/member_extra_info/agreement.txt'))
401 $source_file =
_XE_PATH_.
'files/member_extra_info/agreement.txt';
411 if(!is_readable(
'./files/ruleset/insertMember.xml'))
412 $oMemberAdminController->_createSignupRuleset($config->signupForm);
413 if(!is_readable(
'./files/ruleset/login.xml'))
414 $oMemberAdminController->_createLoginRuleset($config->identifier);
415 if(!is_readable(
'./files/ruleset/find_member_account_by_question.xml'))
416 $oMemberAdminController->_createFindAccountByQuestion($config->identifier);
418 if(
$oModuleModel->needUpdate(
'member.1.8.43.recreate_signup_ruleset'))
420 $oMemberAdminController->_createSignupRuleset($config->signupForm);
445 $config = $oMemberModel->getMemberConfig();
449 if(!$oDB->isTableExists(
'member_login_count') || $config->enable_login_fail_report ==
'N')
return new BaseObject(
$error,
$message);
451 $args =
new stdClass();
452 $args->ipaddress = $_SERVER[
'REMOTE_ADDR'];
457 $last_update = strtotime(
$output->data->last_update);
458 $term = intval($_SERVER[
'REQUEST_TIME']-$last_update);
460 if($term < $config->max_error_count_time)
468 unset($oMemberModel);
490 $config = $oMemberModel->getMemberConfig();
494 if(!$oDB->isTableExists(
'member_count_history') || $config->enable_login_fail_report ==
'N')
return new BaseObject(
$error,
$message);
500 $content = unserialize(
$output->data->content);
502 $args->content = serialize($content);
509 $args->content = serialize($content);
getController($module_name)
$template_path
a path of directory where template files reside
$act
a string value to contain the action name
writeFile($filename, $buff, $mode="w")
addSSLActions($action_array)
recordLoginError($error=0, $message= 'success')
Record login error and return the error, about IPaddress.
getInstance($db_type=NULL)
getAdminController($module_name)
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
recordMemberLoginError($error=0, $message= 'success', $args=NULL)
Record login error and return the error, about MemberSrl.
if(isset($_REQUEST['encode'])) if(isset($_REQUEST['decode'])) $lang
isExistsSSLAction($action)