推荐设备MORE

微信微信小程序—「民生·凤凰

微信微信小程序—「民生·凤凰

公司新闻

PHPCMSV9vip会员管理中心怎样将电子邮箱和登陆密码

日期:2021-04-03
我要分享
应用过PHPCMSV9的朋友都了解,PHPCMSV9vip会员管理中心的登陆密码和电子邮箱是在一起的,改动一个另外一个还要跟随改动,那麼PHPCMSV9vip会员管理中心怎样将电子邮箱和登陆密码分离改动呢,今日齐鲁建网站网编就来讲说PHPCMS电子邮箱和登陆密码分离的方式。

先来啦解下Phpcms v9默认设置vip会员管理中心的账户管理方法里面的改动电子邮箱/登陆密码网页页面:

PHPCMSV9会员中心如何将邮箱和密码分开修改

Phpcms v9默认设置vip会员管理中心的账户管理方法里面的改动电子邮箱/登陆密码网页页面

一些vip会员将会在这里里改动的便会遇到疑惑:改动电子邮箱的同时如何还必须改动登陆密码?

根据此,很必须把改动电子邮箱和改动登陆密码拆分,防止一些不用的不便。

Phpcms v9vip会员管理中心改动电子邮箱/登陆密码拆分提升的方式:

1、改动phpcms/ount_manage_password方式:

$ = array(); if(!is_password($_POST[ info ][ password ])) { showmessage(L( password_format_incorrect ), HTTP_REFERER); if($this- [ password ] != password($_POST[ info ][ password ], $this- [ encrypt ])) { showmessage(L( old_password_incorrect ), HTTP_REFERER);   //改动vip会员电子邮箱 if($this- [ email ] != $_POST[ info ][ email ] is_email($_POST[ info ][ email ])) { $email = $_POST[ info ][ email $[ email ] = $_POST[ info ][ email } else { $email = if(!is_password($_POST[ info ][ newpassword ]) || is_badword($_POST[ info ][ newpassword ])) { showmessage(L( password_format_incorrect ), HTTP_REFERER); $newpassword = password($_POST[ info ][ newpassword ], $this- [ encrypt $[ password ] = $newpassword;   $this- db- update($, array( userid = $this- [ userid ])); if(pc_base::load_config( system , phpsso )) { //原始化phpsso $this- _init_phpsso(); $res = $this- client- ps_member_edit( , $email, $_POST[ info ][ password ], $_POST[ info ][ newpassword ], $this- [ phpssouid ], $this- [ encrypt $message_error = array( -1 = L( user_not_exist ), -2 = L( old_password_incorrect ), -3 = L( email_already_exist ), -4 = L( email_error ), -5 = L( param_error if ($res 0) showmessage($message_error[$res]); }
  showmessage(L( ess ), HTTP_REFERER);

改动为:

$ = array(); if(!is_password($_POST[ info ][ newpassword ]) || is_badword($_POST[ info ][ newpassword ])) { showmessage(L( password_format_incorrect ), HTTP_REFERER); if(trim($_POST[ info ][ newpassword ]) != trim($_POST[ info ][ renewpassword ])) { showmessage(L( passwords_not_match ), HTTP_REFERER); $newpassword = password(trim($_POST[ info ][ newpassword ]), $this- [ encrypt $[ password ] = $newpassword;   $this- db- update($, array( userid = $this- [ userid ])); if(pc_base::load_config( system , phpsso )) { //原始化phpsso $this- _init_phpsso(); $res = $this- client- ps_member_edit($this- [ username ], $this- [ email ], , $_POST[ info ][ newpassword ], $this- [ phpssouid ], $this- [ encrypt $message_error = array( -1 = L( user_not_exist ), -2 = L( old_password_incorrect ), -3 = L( email_already_exist ), -4 = L( email_error ), -5 = L( param_error if ($res 0) showmessage($message_error[$res]); }
  showmessage(L( ess ), HTTP_REFERER);

ount_manage_password方式简单化,制成只改动vip会员登陆密码。

2、配套设施改动前台接待模版文档:templates/cmsyou(你用的模版的文件目录)/,将电子邮箱那一栏的input除掉,实际编码请自身试着改动,这儿不得出实际编码。

PHPCMSV9会员中心如何将邮箱和密码分开修改

3、在phpcms/ount_manage_email方式,用以独立改动email:

public function account_manage_email() { if(isset($_POST[ dosubmit ])) { $ = array();   //改动vip会员电子邮箱 if($this- [ email ] != $_POST[ info ][ email ] is_email($_POST[ info ][ email ])) { $email = trim($_POST[ info ][ email $[ email ] = $_POST[ info ][ email }elseif($this- [ email ] == $_POST[ info ][ email ]) { showmessage(L( email_same ), HTTP_REFERER); } else { showmessage(L( email_format_incorrect ), HTTP_REFERER); $this- db- update($, array( userid = $this- [ userid ])); if(pc_base::load_config( system , phpsso )) { //原始化phpsso $this- _init_phpsso(); $res = $this- client- ps_member_edit($this- [ username ], $email); $message_error = array( -1 = L( user_not_exist ), -2 = L( old_password_incorrect ), -3 = L( email_already_exist ), -4 = L( email_error ), -5 = L( param_error if ($res 0) showmessage($message_error[$res]);   showmessage(L( ess ), HTTP_REFERER); } else { $siteid = isset($_REQUEST[ siteid ]) trim($_REQUEST[ siteid ]) ? intval($_REQUEST[ siteid ]) : 1; $ = ($siteid);   //SEO $SEO = seo($siteid); if(!$setting[ meta_title ]) $setting[ meta_title ] = 改动电子邮箱 $SEO = seo($siteid, ,$setting[ meta_title ],$setting[ meta_description ],$setting[ meta_keywords   $show_validator = true; $ = $this- ;   include template( member , account_manage_email <模版的书写,在这里都不得出实际的编码了,请自主科学研究。

PHPCMSV9会员中心如何将邮箱和密码分开修改

到此,早已取得成功将改动电子邮箱/登陆密码拆分,保证电子邮箱和登陆密码独立改动。

之上便是有关PHPCMS电子邮箱和登陆密码分离的全部內容,有不明白的可加网站站长QQ沟通交流哦。