@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Extract ldap auth from password auth completely

authored by

linead and committed by
epriestley
e6832367 bedc9acf

+24 -23
+24 -23
src/applications/auth/controller/PhabricatorLoginController.php
··· 77 77 78 78 $password_auth = PhabricatorEnv::getEnvConfig('auth.password-auth-enabled'); 79 79 80 + $username_or_email = $request->getCookie('phusr'); 81 + 80 82 $forms = array(); 81 - 82 83 83 84 $errors = array(); 84 85 if ($password_auth) { 85 86 $require_captcha = false; 86 87 $e_captcha = true; 87 - $username_or_email = $request->getCookie('phusr'); 88 88 if ($request->isFormPost()) { 89 89 90 90 if (AphrontFormRecaptchaControl::isRecaptchaEnabled()) { ··· 188 188 // $panel->setCreateButton('Register New Account', '/login/register/'); 189 189 $forms['Phabricator Login'] = $form; 190 190 191 - $ldap_provider = new PhabricatorLDAPProvider(); 192 - if ($ldap_provider->isProviderEnabled()) { 193 - $ldap_form = new AphrontFormView(); 194 - $ldap_form 195 - ->setUser($request->getUser()) 196 - ->setAction('/ldap/login/') 197 - ->appendChild( 198 - id(new AphrontFormTextControl()) 199 - ->setLabel('LDAP username') 200 - ->setName('username') 201 - ->setValue($username_or_email)) 202 - ->appendChild( 203 - id(new AphrontFormPasswordControl()) 204 - ->setLabel('Password') 205 - ->setName('password')); 191 + } 192 + 193 + $ldap_provider = new PhabricatorLDAPProvider(); 194 + if ($ldap_provider->isProviderEnabled()) { 195 + $ldap_form = new AphrontFormView(); 196 + $ldap_form 197 + ->setUser($request->getUser()) 198 + ->setAction('/ldap/login/') 199 + ->appendChild( 200 + id(new AphrontFormTextControl()) 201 + ->setLabel('LDAP username') 202 + ->setName('username') 203 + ->setValue($username_or_email)) 204 + ->appendChild( 205 + id(new AphrontFormPasswordControl()) 206 + ->setLabel('Password') 207 + ->setName('password')); 206 208 207 - $ldap_form 208 - ->appendChild( 209 - id(new AphrontFormSubmitControl()) 210 - ->setValue('Login')); 209 + $ldap_form 210 + ->appendChild( 211 + id(new AphrontFormSubmitControl()) 212 + ->setValue('Login')); 211 213 212 - $forms['LDAP Login'] = $ldap_form; 213 - } 214 + $forms['LDAP Login'] = $ldap_form; 214 215 } 215 216 216 217 $providers = PhabricatorOAuthProvider::getAllProviders();