Menu

Using Internal DB Authentication Plugin

adanac1812
2007-02-08
2013-03-26
  • adanac1812

    adanac1812 - 2007-02-08

    I am having trouble getting authentication working for contacts. I want to use the internal db for all users.

    Currently using RC5 2007 Feb 06 version.

    I can logon as ADMIN and I have tried using the staff logon admin screens, as indicated in an earlier post to create contacts; however, this functionality appears incomplete. Are you expecting to have this compelete soon?

                  http://your.domain.com/mamook.php?select=staff_login_admin

    I also tried creating contacts the 'long way' but found I was missing one part of the data that is required. The data missing was auth_type_id, as per the instructions:

    <snip from previous post>
    Next, we have to add the record in login_info. This table links users from different authentication mechanisms to account ids. First we have to find the auth_type_id your Mamook has assigned to the internal_db authentication plugin.

    SELECT auth_type_id FROM auth_type WHERE name = 'internal_db';
    <end snip>

    It appears my internal_db authentication plugin was not automatically detected because the auth_type table is empty and I have no auth_type_id to select from for 'internal_db'. I do have 'Internal DB Authentication' in the plugins table and a MamookInternalDBAuthentication in the plugins directory.

    Is it possible I have failed to configure something? Is there something more I need to do to have auth_types be recognized?

     
    • Chan

      Chan - 2007-02-15

      Hi,

      What part of the staff logon admin screen seems to be incomplete?

      As for the Mamook internal db authentication, you can try to reinstall it and see if it works. To re-install, delete the row from your plugins table for the internal db. Then, just run Mamook through the web again, and it should discover that internal db auth plugin, and install it again. Once this is done, check the plugin table to see if it's installed, and check the auth types table again.

      Cheers

      -Chris Chan

      Mamook Core Developer

       
    • adanac1812

      adanac1812 - 2007-02-16

      Hi Chris,

      I try a full re-install including the database with the latest code.

      The key part of the logon_staff_admin screen that is not working is the 'Add Staff Login'. There are a few fields but no submit button. Here is the html source for the form, you can see it just sort of trails off with closing:

      <form method="post"
            action="mamook.php?&amp;menu_select=&amp;select=staff_login_admin"
            name="add_edit_form">
        <input type="hidden" name="action" value="save_contact" />
        <input type="hidden" name="contact_id" value="" />
        <input type="hidden" name="new_id" value="1" />

        <table border="0" cellpadding="5" cellspacing="0" class="row1" width="95%">
                <tr>
              <td colspan="2">
                        </td>
            </tr>
              <tr>
            <td align="right">First name:</td>
            <td>
              <input type="text" name="first_name" size="40"
                     value="" />
            </td>
          </tr>
          <tr>
            <td align="right">Last name:</td>
            <td>
              <input type="text" name="last_name" size="40"
                     value="" />
            </td>
          </tr>
          <tr>
            <td align="right">Department:</td>
            <td><input type='checkbox' name='departments[2]'>Computer Science / Math</option></tr><tr><td></td><td><input type='checkbox' name='departments[15]'>Director's Office of Co-operative Education</option></tr><tr><td></td><td><input type='checkbox' name='departments[18]'>Employer Service</option></tr><tr><td></td><td><input type='checkbox' name='departments[1]'>Engineering</option></tr>        <tr>
            <td align="right"> Enable On: </td>
            <td>

       
      • Chan

        Chan - 2007-02-16

        In that file, a function called html_hours_dropdown() is executed which relies on a PHP function called array_combine(). Unfortunately, array_combine() only became available in PHP 5, so this will definitely generate an error for those using PHP 4. I have just committed a fix for this in the nightly snapshot.

        There will probably be more cases of function usage that are exclusive to PHP 5 because that's the environment that the majority of our developers are now working on.

        However, the nightly snapshots have been fully tested in a PHP 5 environment, and it is 100% compatible now. So, for those who can, we recommend upgrading to PHP 5 if possible. This is the direction that the Mamook Software System will be moving towards.

        As for the internal auth, did it install okay? If not, you can manually install it by opening up the MamookInternalDBAuthentication.class.php file, and manually run the SQL queries that are in its install method.

        Hope that helps

        -Chris Chan
        Mamook Core Developer

         

Log in to post a comment.

MongoDB Logo MongoDB