Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Creating a user in WebMail Lite Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mattj
Newbie
Newbie


Joined: 15 September 2010
Online Status: Offline
Posts: 1
Posted: 15 September 2010 at 10:42am | IP Logged Quote mattj

I'm trying to sift through the source to figure out how to create a new user and I'm close! When I run the script below it inserts an account into awm_accounts, and it creates a user in a_users. However it doesn't set the awm_account's user_id, it allows the webmail page to load but i get "Can't get message list". Any input would be most appreciated.



$null = null;
$acct = new Account();
$user = new User();
$dbStorage = DbStorageCreator::CreateDatabaseStorage($null);

$acct->Email = $email;
$acct->MailIncLogin = $login;
$acct->MailIncHost = $pop3;
$acct->MailIncPassword = $password;
$acct->MailIncPort = 110;
$acct->MailOutLogin = $login;
$acct->MailOutHost = $smtp;
$acct->MailOutPassword = $password;
$acct->MailOutPort = 25;
$acct->MailProtocol = MAILPROTOCOL_POP3;
$acct->MailOutAuthentication = true;
$acct->DefaultAccount = 1;


$dbStorage->InsertUserData($acct);
$dbStorage->InsertAccountData($acct);
$dbStorage->InsertSettings($acct);
Back to Top View mattj's Profile Search for other posts by mattj
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide