Quote:
Mithrandir wrote:
Quote:Did you forget about our API?
Admittedly, I didn't spot that.
That changes the situation somewhat, but still leaves one major question: How do we synchronise user accounts? I don't see API functions for creating, updating and deleting users.
Provided we know the username and password of a SMF user, I can think of a couple of ways to accomplish this bridge with XOOPS 2.2.
Anyone interested in dedicating themselves to developing this bridge, I'd be happy to share this with.
The API will define a variable called $smf_user_info, which you can then use to get SMF's user information. As far as creating, updating and deleting users, I've been taking a good look at SMF 1.1 lately (currently in beta), and there are numerous checks throughout the files to call various integration functions that can be defined in the settings table, as well as an optional SMF_INTEGRATION_SETTINGS constant that can contain any additional integration-related settings needed that will be added to SMF's settings array ($modSettings):
SMF_INTEGRATION_SETTINGS (constant, not in the table)
integrate_buffer (output buffer from integration) [Subs.php, line 2444]
integrate_pre_include - name of a file to include prior to integration [Load.php, line 175]
Functions:
integrate_activate(username) [ManageMembers.php, Profile.php, Register.php] - activates the user account in the CMS/portal
integrate_change_email(username, new email) [Profile.php, Register.php] - changes the email address in the CMS/portal
integrate_delete_member(user ID) [Subs-Members.php] - deletes the member in the CMS/portal
integrate_exit(whether or not to show the footer) [Subs.php] - sends output to the portal and ends execution
integrate_login(username, hashed password [if set], session length in minutes) [LogInOut.php] - logs the user in
integrate_logout(username) - logs the user out
integrate_redirect(location, whether or not to send a refresh header) [Subs.php] - redirect user to someplace in portal/CMS following posting of form data
integrate_register(username, registration variables, theme variables)
integrate_reset_pass(username, username [for password salt], new password [unhashed]) [Profile.php]
integrate_validate_login(username, hashed password [if set], session length in minutes) [LogInOut.php] - validates the current login (makes sure everything is correct)
integrate_verify_password(username, current (un-hashed) password, false) [Profile.php] - verifys that the password entered is correct (not sure what the third parameter is for...)
integrate_verify_user - makes sure the user is who they actually say they are
There aren't any functions to actually update the user in the CMS/portal, but this could be added pretty easily if needed.