Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Plugins/Modules/Addons

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
View Poll Results: Would you like to see a mailuser interface for Roundcube & Squirrelmail?
Yes 211 99.06%
No 2 0.94%
Voters: 213. You may not vote on this poll

Reply
 
Thread Tools Display Modes
  #131  
Old 19th February 2010, 07:52
SpeedyB SpeedyB is offline
HowtoForge Supporter
 
Join Date: Dec 2009
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by Horfic View Post
Solution:
When a client gets created, the sysuser get automatically added to the system.
So this sysuser has now a associated client and the error won't appear.

1.)So the best way, would be to just create the missing client for the sysuser.
Dear Horfic,

THis is not the case in my situation.

I have several clients, and all clients have 2 sysusers (Why only have one admin for an environment??)
When I have 5 clients I have 10 sys users....

The piece of code you run:
Code:
$client->mail_spamfilter_user_update($session_id, $id, $mail_user[0]['sys_userid'], $params);
requires the following entries:
Sessionid,
MailboxID
ClientID,
Parameters

Since the code requests an clientid and you use the sys_userid this is where the problem starts. I haven't searched if one of the mailbox poperties is the clientid, but otherwise it might be possible to get the clientid form the sysuser properties?

regards,

Bas Steelooper
Reply With Quote
Sponsored Links
  #132  
Old 19th February 2010, 10:48
NeeChee NeeChee is offline
Member
 
Join Date: May 2009
Posts: 64
Thanks: 14
Thanked 20 Times in 9 Posts
Default

Quote:
Originally Posted by Horfic View Post
PS: French translation is in the svn.
Yes I noticed, if you check the language section of my instructions, you'll see I've inventorized all languages and which parts of them are still missing or incomplete.
Reply With Quote
The Following User Says Thank You to NeeChee For This Useful Post:
Horfic (19th February 2010)
  #133  
Old 19th February 2010, 12:43
Horfic Horfic is offline
Senior Member
 
Join Date: Mar 2009
Location: Austria
Posts: 324
Thanks: 55
Thanked 93 Times in 58 Posts
Send a message via Skype™ to Horfic
Default

@SpeedyB
You are totaly right with that, but the mail_user table only has the sysuser_id field, no client field, so there is no other way for the moment (except the second solution with the 0 I posted, so everything gets created by admin).

I would have to change a little bit in the remoting_lib.inc.php from ISPConfig 3. ATM you have to send the client_id, he is looking up if that client exists and then he looks for the appropriate sysuser and is using the fields of it (sys_username, sys_userid, sys_default_group, sys_groups).

It would be better if he is just looks up if the sysuser exists and is then using the fields, so that we skip the client lookup.

The modified loadUserProfile function in the /interface/lib/classes/remoting_lib.inc.php would be this.
PHP Code:
function loadUserProfile($client_id 0) {
    global 
$app,$conf;
            
    
$client_id intval($client_id);
            
    if(
$client_id == 0) {
        
$this->sys_username         'admin';
        
$this->sys_userid            1;
        
$this->sys_default_group     1;
        
$this->sys_groups            1;
    } else {
        
//* load system user
        
$user $app->db->queryOneRecord("SELECT * FROM sys_user WHERE sysuser_id = $client_id");
        if(empty(
$user["userid"])) {
            
$this->errorMessage .= 'No sysuser with the ID $client_id found.';
            return 
false;
        }
        
$this->sys_username         $user['username'];
        
$this->sys_userid            $user['userid'];
        
$this->sys_default_group     $user['default_group'];
        
$this->sys_groups             $user['groups'];
    }
            
    return 
true;
            

I don't know how much it would effect the other scripts which are using the remote framework, but I know that pretty much only the sysuser_id and not the client_id is in the tables.

So probably it helps the others too.

UPDATE: I updated the remote_lib.inc.php file in the ISPConfig 3 svn, so with the new version it will be fine^^
__________________
web wack creations - We create your custom web application
Mailuser interface for ISPConfig 3

Last edited by Horfic; 22nd February 2010 at 14:00.
Reply With Quote
The Following User Says Thank You to Horfic For This Useful Post:
NeeChee (22nd February 2010)
  #134  
Old 22nd February 2010, 21:48
NeeChee NeeChee is offline
Member
 
Join Date: May 2009
Posts: 64
Thanks: 14
Thanked 20 Times in 9 Posts
Default

Quote:
Originally Posted by Horfic View Post
UPDATE: I updated the remote_lib.inc.php file in the ISPConfig 3 svn, so with the new version it will be fine^^
Did you get SVN access? Pretty awesome
Reply With Quote
  #135  
Old 23rd February 2010, 13:59
moglia moglia is offline
Member
 
Join Date: Apr 2009
Posts: 92
Thanks: 7
Thanked 15 Times in 11 Posts
Exclamation No sysuser with the ID $client_id found

Im just upgraded to SVN version and now any modifications on autoresponse and other says: "No sysuser with the ID $client_id found"
Reply With Quote
  #136  
Old 23rd February 2010, 14:19
NeeChee NeeChee is offline
Member
 
Join Date: May 2009
Posts: 64
Thanks: 14
Thanked 20 Times in 9 Posts
Default

Quote:
Originally Posted by moglia View Post
Im just upgraded to SVN version and now any modifications on autoresponse and other says: "No sysuser with the ID $client_id found"
See post #133
Reply With Quote
  #137  
Old 23rd February 2010, 14:29
moglia moglia is offline
Member
 
Join Date: Apr 2009
Posts: 92
Thanks: 7
Thanked 15 Times in 11 Posts
Default

Quote:
Originally Posted by NeeChee View Post
See post #133
Im using latest version from SVN.
Reply With Quote
  #138  
Old 23rd February 2010, 14:44
moglia moglia is offline
Member
 
Join Date: Apr 2009
Posts: 92
Thanks: 7
Thanked 15 Times in 11 Posts
Exclamation Some info about it.

I maked a debug info at console the remote script pass ID 2 to remote lib.
try make some SQL to investigate the situation:

Code:
mysql> select distinct(sys_userid) from mail_user;
+------------+
| sys_userid   | 
+------------+
|          2      |
+------------+

mysql> select sys_userid, client_id,contact_name,company_name from client;
+------------+-----------+------------------------+----------------------
| sys_userid   | client_id   | contact_name              | company_name         |
+------------+-----------+------------------------+----------------------
|          1      |         1     | Rodrigo Moglia              | INTERARIA IT           |
|          1      |         2     | Pierre                         | Pierre                      |
--------------------------------------------------------------------------

mysql> select userid, sys_userid, username from sys_user;
+--------+------------+--------------+
| userid | sys_userid | username          |
+--------+------------+--------------+
|      1    |          1      | admin           |
|      2    |          1      | interatius       |
|      3    |          1      | pierre        |
---------------------------------------
Reply With Quote
  #139  
Old 23rd February 2010, 15:16
NeeChee NeeChee is offline
Member
 
Join Date: May 2009
Posts: 64
Thanks: 14
Thanked 20 Times in 9 Posts
Default

Quote:
Originally Posted by moglia View Post
Im using latest version from SVN.
Yes, but the patch was done in the ISPconfig3 SVN and not the plugin SVN since the patch had to be done in the ISPconfig3 Remote Framework. If you can't update your ISPconfig3 installation through SVN, try editing the file as described in post #133.

Last edited by NeeChee; 23rd February 2010 at 15:21.
Reply With Quote
  #140  
Old 23rd February 2010, 15:26
moglia moglia is offline
Member
 
Join Date: Apr 2009
Posts: 92
Thanks: 7
Thanked 15 Times in 11 Posts
 
Exclamation Hi

My translator of brazilian portuguese and use latest version SVN head on my prodution server.
No sysuser with the ID $client_id found persists i created another account as reseller or client
and the same results displayed.

Last edited by moglia; 23rd February 2010 at 15:27. Reason: observations
Reply With Quote
Reply

Bookmarks

Tags
interface, ispconfig 3, mail, roundcube, squirrelmail, webmail

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
Debian Lenny: waiting for interface eth0:1 before doing NFS mounts (warning) edge Installation/Configuration 2 9th June 2009 07:55
IPtables rule to let PPTP access LAN brianwebb01 Installation/Configuration 0 1st May 2008 21:23
How to create a dhcp server for intranet (with multi-homed alias)? zenny HOWTO-Related Questions 8 29th February 2008 15:16
No DHCP on second LAN interface DrJohn Server Operation 2 8th November 2007 02:58


All times are GMT +2. The time now is 06:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.