1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[28627],{70852:(s,i,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/Classes/BigCommerce/Accounts/Login",function(){return n(6181)}])},6181:(s,i,n)=>{"use strict";n.r(i),n.d(i,{default:()=>t,useTOC:()=>l});var e=n(74848),r=n(27849),h=n(40272),d=n(71355);function l(s){return[{value:"Constants",id:"constants",depth:2},{value:"Methods",id:"methods",depth:2},{value:"__construct",id:"__construct",depth:3},{value:"connect_customer_id",id:"connect_customer_id",depth:3},{value:"login_url",id:"login_url",depth:3},{value:"login_error_handler",id:"login_error_handler",depth:3},{value:"lostpassword_url",id:"lostpassword_url",depth:3},{value:"before_reset_password_email",id:"before_reset_password_email",depth:3},{value:"lostpassword_error_handler",id:"lostpassword_error_handler",depth:3},{value:"register_url",id:"register_url",depth:3},{value:"redirect_account_pages_to_auth",id:"redirect_account_pages_to_auth",depth:3},{value:"redirect_auth_pages_to_account",id:"redirect_auth_pages_to_account",depth:3},{value:"authenticate_new_user",id:"authenticate_new_user",depth:3},{value:"check_password_for_linked_accounts",id:"check_password_for_linked_accounts",depth:3}]}let t=(0,r.e)(function(s){let{toc:i=l(s)}=s,n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",span:"span",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...s.components};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h1,{children:"Login"}),"\n",(0,e.jsx)(n.p,{children:"Handles the login and lost password logic for the BigCommerce account integration with WordPress."}),"\n",(0,e.jsx)(n.p,{children:"This class connects WordPress users to BigCommerce customers, processes customer login, and provides the necessary functionality for user management."}),"\n",(0,e.jsxs)(n.ul,{children:["\n",(0,e.jsxs)(n.li,{children:["Full name: ",(0,e.jsx)(n.code,{children:"\\BigCommerce\\Accounts\\Login"})]}),"\n"]}),"\n",(0,e.jsx)(n.h2,{id:i[0].id,children:i[0].value}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{style:{textAlign:"left"},children:"Constant"}),(0,e.jsx)(n.th,{style:{textAlign:"left"},children:"Visibility"}),(0,e.jsx)(n.th,{style:{textAlign:"left"},children:"Type"}),(0,e.jsx)(n.th,{style:{textAlign:"left"},children:"Value"})]})}),(0,e.jsx)(n.tbody,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{style:{textAlign:"left"},children:(0,e.jsx)(n.code,{children:"CUSTOMER_ID_META"})}),(0,e.jsx)(n.td,{style:{textAlign:"left"},children:"public"}),(0,e.jsx)(n.td,{style:{textAlign:"left"}}),(0,e.jsx)(n.td,{style:{textAlign:"left"},children:"âbigcommerce_customer_idâ"})]})})]}),"\n",(0,e.jsx)(n.h2,{id:i[1].id,children:i[1].value}),"\n",(0,e.jsx)(n.h3,{id:i[2].id,children:i[2].value}),"\n",(0,e.jsx)(n.p,{children:"Login constructor."}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" __construct"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"BigCommerce"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"Api_Factory"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $api_factory): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"mixed"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsx)(n.tbody,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$api_factory"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"\\BigCommerce\\Api_Factory"})}),(0,e.jsx)(n.td,{children:"The API factory to be used for creating API instances."})]})})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[3].id,children:i[3].value}),"\n",(0,e.jsx)(n.p,{children:"Connect the user to a BigCommerce account, if it exists"}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" connect_customer_id"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $username, \\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_User"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $user): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"void"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$username"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$user"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"\\WP_User"})}),(0,e.jsx)(n.td,{})]})]})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[4].id,children:i[4].value}),"\n",(0,e.jsx)(n.p,{children:"Filters the login URL to point to the front-end login page"}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" login_url"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $login_url, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $redirect, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"bool"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $force_reauth): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$login_url"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{children:"The login URL. Not HTML-encoded."})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$redirect"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{children:"The path to redirect to on login, if supplied."})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$force_reauth"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"bool"})}),(0,e.jsx)(n.td,{children:"Whether to force reauthorization, even if a cookie is present."})]})]})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[5].id,children:i[5].value}),"\n",(0,e.jsx)(n.p,{children:"Handle errors from the login form, redirecting back\nto the front-end login page."}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" login_error_handler"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_Error"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $errors, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $redirect): \\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_Error"})]})})}),"\n",(0,e.jsx)(n.p,{children:"Note that is hooked in on a filter, not an action,\nsince the latter was not available."}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$errors"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"\\WP_Error"})}),(0,e.jsx)(n.td,{})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$redirect"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{})]})]})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[6].id,children:i[6].value}),"\n",(0,e.jsx)(n.p,{children:"Get lost password url"}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" lostpassword_url"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $login_url, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $redirect): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$login_url"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$redirect"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{})]})]})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[7].id,children:i[7].value}),"\n",(0,e.jsx)(n.p,{children:"If a user exists only on BC, try to sync before reset password email is sent."}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" before_reset_password_email"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_User"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"false"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $user_data, \\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_Error"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $errors): \\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_User"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"false"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$user_data"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"\\WP_User|false"})}),(0,e.jsx)(n.td,{children:"WP_User object if found, false if the user does not exist."})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$errors"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"\\WP_Error"})}
1),(0,e.jsxs)(n.td,{children:["A WP_Error object containing any errors generated",(0,e.jsx)(n.br,{}),"by using invalid credentials."]})]})]})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[8].id,children:i[8].value}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" lostpassword_error_handler"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_Error"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $error): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"void"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsx)(n.tbody,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$error"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"\\WP_Error"})}),(0,e.jsx)(n.td,{})]})})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[9].id,children:i[9].value}),"\n",(0,e.jsx)(n.p,{children:"Handle registration url"}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" register_url"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $url): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsx)(n.tbody,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$url"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{})]})})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[10].id,children:i[10].value}),"\n",(0,e.jsx)(n.p,{children:"Redirect all account pages to the login screen\nfor unauthenticated users."}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" redirect_account_pages_to_auth"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"void"})]})})}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[11].id,children:i[11].value}),"\n",(0,e.jsx)(n.p,{children:"Redirect the login/registration pages to the\naccount page for logged in users."}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" redirect_auth_pages_to_account"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}
1,children:"(): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"void"})]})})}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[12].id,children:i[12].value}),"\n",(0,e.jsx)(n.p,{children:"If a user logs in with credentials for a user in BigCommerce\nthat do not match a user in WordPress, create a user account\nand log the user in."}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" authenticate_new_user"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_User"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_Error"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $user, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $username, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $password): \\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_User"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"\\"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"WP_Error"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"|"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"null"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$user"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"\\WP_User|\\WP_Error|null"})}),(0,e.jsx)(n.td,{})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$username"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$password"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{})]})]})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.h3,{id:i[13].id,children:i[13].value}),"\n",(0,e.jsx)(n.p,{children:"Validate password for accounts"}),"\n",(0,e.jsx)(n.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,e.jsx)(n.code,{children:(0,e.jsxs)(n.span,{children:[(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" check_password_for_linked_accounts"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"bool"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $match, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $password, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $hash, "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string|int"}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $user_id): "}),(0,e.jsx)(n.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"bool"})]})})}),"\n",(0,e.jsx)(n.p,{children:(0,e.jsx)(n.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:"Parameter"}),(0,e.jsx)(n.th,{children:"Type"}),(0,e.jsx)(n.th,{children:"Description"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$match"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"bool"})}),(0,e.jsx)(n.td,{children:"Whether the passwords match."})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$password"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{children:"The plaintext password."})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$hash"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string"})}),(0,e.jsx)(n.td,{children:"The hashed password."})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:"$user_id"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.strong,{children:"string|int"})}),(0,e.jsx)(n.td,{children:"User ID. Can be empty."})]})]})]}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsx)(n.hr,{}),"\n",(0,e.jsxs)(n.blockquote,{children:["\n",(0,e.jsx)(n.p,{children:"Automatically generated on 2025-01-21"}),"\n"]})]})}
1,"/Classes/BigCommerce/Accounts/Login",{filePath:"pages/Classes/BigCommerce/Accounts/Login.md",timestamp:1737496368e3,pageMap:h.O,frontMatter:{},title:"Login"},"undefined"==typeof RemoteContent?l:RemoteContent.useTOC)}},s=>{var i=i=>s(s.s=i);s.O(0,[27849,40272,90636,46593,38792],()=>i(70852)),_N_E=s.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.