Firefox PHP

user created remotely cannot post messages

Posted by emphyrio 
user created remotely cannot post messages
January 27, 2010 01:42PM
Hi there,

I am using an old version of phorum (3.4.6) and I have this problem:

I create a user directly in the tables forums_auth & forums_user2group using sql statements from a PHP source. Once the new user is created the user can login to phorum without a problem, except the user cannot post any messages (the user is reverted to the login screen). When I compare all the fields with a user that was created directly in the phorum admin interface, all the fields are filled properly. Permission levels are ok and all settings are the same except the username.

The weird thing is when I goto the admin interface and just save the group the user belongs to, the user suddenly is able to post, although apparently the table values have not changed...

Any ideas on what's happening?

Here are the SQL statements I am using:

INSERT INTO forums_auth (username, Password, permission_level, max_group_permission_level) VALUES ('myUser', MD5('myPwd'), 2, 3)
SELECT * FROM forums_auth WHERE username = 'myUser' (to retrieve the userID that was created
INSERT INTO forums_user2group (user_ID, group_ID) VALUES (phorumUserID , 2) where phorumUserID is the variable retrieved in the previous statement

ps. I know, I have to update to the latest phorum version, but I do not want to do that right now.

Hope anyone can give me hint as to what I am doing wrong.
Thx, Emphyrio



Edited 3 time(s). Last edit at 01/28/2010 06:55AM by emphyrio.
Sorry, only registered users may post in this forum.

Click here to login