Menu

#1433 Submitted by to display full name

open
nobody
None
1
2020-11-09
2018-02-04
No

Hello,

We are getting the login creditentials from our LDAP server and the submitted by field is automatically populated from the username field, is there a way to display the full name instead? How can this be done?

Thanks

Discussion

<< < 1 2 3 4 5 > >> (Page 2 of 5)
  • Mona AbdelHady

    Mona AbdelHady - 2018-02-07

    Big problem now! I tried viewing an entry and all I get on the view enty page is the entry title and (provate) next to it, How can I fix this quick. Thanks

     
  • Campbell Morrison

    Go back to the original 1.4.8 versions of functions_view.inc and view_entry.php, as attached.

    By the way, when you are testing are you testing on your production version? If so, I recommend you copy that web folder into a separate folder for testing.

     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      I did revert back. Of course now I see the username not the full name. Thanks

       
  • Campbell Morrison

    Try again now, in a test directory.

     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      I tried now in a test directory, same result. Just the name (short description) of the entry and (private) next to it and the rest of the page is blank.

       
  • Campbell Morrison

    Can you (a) add those two debugging lines to the bottom of internalconfig.inc.php and see if you get any messages and (b) post your view_entry.php and functions.inc files here.

    Thanks

     

    Last edit: Campbell Morrison 2018-02-07
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      Sure. I got the same error:

      Notice: Undefined index: ldap_name_attrib in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/auth_ldap.inc on line 341

       
  • Campbell Morrison

    Can you also add in auth_ldap.inc at line 42

    global $ldap_name_attrib;
    

    ie just after

    global $ldap_email_attrib;
    
     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      Now I don't see the error but the page is still blank with the entry short description and (private) next to it

       
  • Campbell Morrison

    Can you post the copies of functions_view.inc and view_entry.php that you are using please?

     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      Sure. Attched.

       
  • Campbell Morrison

    Can you delete line 76 in functions_view.inc, ie the second case 'create_by':.

     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      Done but still the same page.

       
  • Campbell Morrison

    Can you replace the function authLdapGetName() at roughly line 306 in auth_ldap.inc with the following:

    function authLdapGetName($user)
    {
      $name = '';
      $object = array();
    
      $res = authLdapAction("authLdapGetNameCallback", $user, $object);
      var_dump($user);
      var_dump($res);
      var_dump($object);
      if ($res)
      {
        $name = $object['name'];
      }
      return $name;
    }
    

    It should output some debugging information. You may need to remove confidential details from the debugging output before posting it here.

     
  • Mona AbdelHady

    Mona AbdelHady - 2018-02-07

    I have replaced the code but nothing changed so I was logging out and logging in again and after logout I got the lines below:

    Notice: Undefined index: entry.room_name in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 86

    Notice: Undefined index: entry.room_admin_email in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 92

    Notice: Undefined index: entry.area_id in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 92

    Notice: Undefined index: entry.area_name in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 86

    Notice: Undefined index: entry.area_admin_email in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 92

    Notice: Undefined index: entry.room_disabled in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 92

    Notice: Undefined index: entry.area_disabled in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 92

    Notice: Undefined index: entry.duration in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 92

    Notice: Undefined index: entry.room_id in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 86

    Notice: Undefined index: entry.last_updated in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/functions_view.inc on line 92

     
  • Campbell Morrison

    Don't worry about those Notice errors - that's a bug in 1.4.8. Can you try the attached diagnostic version of functions_view.inc?

     
  • Mona AbdelHady

    Mona AbdelHady - 2018-02-07

    Uploaded and this is what I get below the title of the entry

    string(10) "username of the booker"

     
  • Campbell Morrison

    Can you set

    $ldap_debug = true;
    

    in your config file and use the attached version of auth_ldap.inc.

     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      Same result:

      string(10) "username of the booker"

       
      • Mona AbdelHady

        Mona AbdelHady - 2018-02-07

        Very sorry. I didn't upload the config file. Here are the results:

        string(10) "username" authLdapAction: Got LDAP connection
        authLdapAction: Constructed dn 'uid=username,cn=users,dc=opendir,dc=example,dc=org' and user_search 'uid=username' using 'uid'
        authLdapGetNameCallback: base_dn 'cn=users,dc=ldap,dc=example,dc=org' dn 'uid=username,cn=users,dc=ldap,dc=example,dc=org' user_search 'uid=username' user 'username'

         
  • Campbell Morrison

    Presumably you have substituted the real username with 'username'?

     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      Yes and the domains as well.

       
  • Campbell Morrison

    Here's another version of auth_ldap.inc with yet more diagnostics.

     
    • Mona AbdelHady

      Mona AbdelHady - 2018-02-07

      I got:

      string(10) "username" In authLdapGetName()
      authLdapAction: Got LDAP connection
      authLdapAction: Constructed dn 'uid=username,cn=users,dc=LDAP,dc=example,dc=org' and user_search 'uid=username' using 'uid'
      authLdapGetNameCallback: base_dn 'cn=users,dc=LDAP,dc=example,dc=org' dn 'uid=username,cn=users,dc=LDAP,dc=example,dc=org' user_search 'uid=username' user 'username'
      About to do ldap_read

      Fatal error: Call to undefined function utf8_strtolower() in /srv/www/cac-eg/misc/htdocs/campusaccess/webTesting/auth_ldap.inc on line 358

       
  • Campbell Morrison

    Ok, try this

     
<< < 1 2 3 4 5 > >> (Page 2 of 5)