Changeset 1716
- Timestamp:
- 11/26/09 16:27:08 (15 years ago)
- Location:
- branches/2.0/phpgwapi/templates/default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/phpgwapi/templates/default/login.tpl
r1247 r1716 62 62 <div id="mensagem" class="msgInicial" >{cd}<br>{lang_message}</div> 63 63 {action} 64 <div id="conteudo_login" style="display:{show};"> 64 <div id="conteudo_login" style="display:{show};">{select_organization} 65 65 <div class="login_label"> 66 66 <label for="usuario">{lang_username}</label> -
branches/2.0/phpgwapi/templates/default/login_default.php
r1247 r1716 120 120 } 121 121 } 122 if($_POST['user']) 123 { 124 $_POST['login'] = $_POST['user']; 125 } 126 ///// Início - Código temporário: Para renomeação de login com organização para sem. ////// 127 /* $common = CreateObject('phpgwapi.common'); 128 $ldap_conn = $common->ldapConnect(); 129 $justthese = array("uid"); 130 $filter="(&(phpgwAccountType=u)(uid=".$_POST['user']."))"; 131 $ldap_search = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese); 132 $ldap_info = ldap_get_entries($ldap_conn, $ldap_search); 133 if ($ldap_info['count'] != 0) // Verifica se o login existe sem organização. 134 { 135 $_POST['login'] = $_POST['user']; 136 } 137 ldap_close($ldap_conn);*/ 138 /// Fim - Código temporário: Para renomeação de login com organização para sem. ////// 122 if($_POST['user']) { 123 if($GLOBALS['phpgw_info']['server']['use_prefix_organization']) { 124 $common = CreateObject('phpgwapi.common'); 125 $ldap_conn = $common->ldapConnect(); 126 $justthese = array("uid"); 127 $filter="(&(phpgwAccountType=u)(uid=".$_POST['user']."))"; 128 $ldap_search = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese); 129 $ldap_info = ldap_get_entries($ldap_conn, $ldap_search); 130 ldap_close($ldap_conn); 131 if ($ldap_info['count'] != 0) { 132 $_POST['login'] = $_POST['user']; 133 } 134 } 135 else 136 $_POST['login'] = $_POST['user']; 137 } 139 138 if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' && 140 139 !isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN'])) … … 245 244 if($GLOBALS['phpgw_info']['server']['use_prefix_organization']) 246 245 { 247 $organization_select = "<tr><td width=\"66\" class=\"loginLabel\">";248 $organization_select .= lang("organization").":</td>";249 $organization_select .="<td width=\"135\">";250 $organization_select .="<select name=\"organization\">\n";251 252 246 $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 253 247 $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); … … 272 266 $organization_select .= '>' . $organization_vars . "</option>\n"; 273 267 } 274 $organization_select .= "</select>\n"; 275 $organization_select .="</td><td> </td></tr>"; 268 $organization_select = '<div class="login_label"><label>'.lang("organization") 269 .'</label><br><select name="organization">' 270 .$organization_select.'</select></div>'; 276 271 $tmpl->set_var('select_organization',$organization_select); 277 272 }
Note: See TracChangeset
for help on using the changeset viewer.