Using the usernames and passwords stored in ISPConfig

Discussion in 'General' started by mphayesuk, Mar 29, 2006.

  1. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Hi I think this thread might be best placed in the scripts page but I will start it here anyway.

    What I am looking to do is password protect one of the pages in every customers web site.

    So I want to use the usernames and passwords that they use to collect email which is stored in the ISPConfig table, just like the ubiemail does.

    But I only want the users that are connected to that site to be able to get in and not have access to anyother web site password protected page.

    So in short I am goint to have the same (more or less) page for every customer but only have the users that have been created for that site to have access to it by using their web mail username and password.

    I am not a good php programmer so try and give me as many pointers as possible.

    Thanks.
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Ok, that seems to be a good solution, however is there a way to link the username and passwords with the ones used by the webmail.

    I.E. the users dont need to remember two sets of usernames and passwords, if they change their password on the webmail the password for the protected folder is also changed.

    Does this make sense????

    If not then using the protected directory method will be fine.

    Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If the page that shall be password protected is a php page, you can try to use one of the pop3 libraries available for PHP. Just use the login function for pop3 to test if the username / password combination is correct without retrieving email messages. If the password is correct, you can show the content of the page.

    To exclude users from other domains you might have to do a lookup for the username / domain combination in the ISPConfig database too.
     
  5. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Ok.. how do I give/create a user that will only have "read only" rights to the ISPConfig MySQL database.

    Thanks
     
  6. mphayesuk

    mphayesuk Member HowtoForge Supporter

    A further note to this is there a way to specify specific access to certain tables ect...

    Thanks
     
  7. falko

    falko Super Moderator Howtoforge Staff

Share This Page