|
#1
|
|||
|
|||
|
Hi
I am modifying the Plesk module to work better with Plesk 9.5 and now have it creating an account if one does not exist and then a domain which it did not before. I want to try and go a bit further if I can but my experience of how the modules are written is limited. The question I have generally about module writing is how I can access other information about the account requesting a domain so that I can pass Plesk fuller account details such as name and address, are these fields easy to extract from the DB from within a module. If so, is there some sample code anywhere. Thanks Paul |
|
#2
|
|||
|
|||
|
Account information is not available to modules in v2.5. The Plesk module currently does not ask for first name, address, etc., which you would need to ask for with your updated module. I would suggest reviewing the documentation at http://blesta.com/manual/Modules and taking a look at other modules for reference.
For example, in the constructor, you could update the module to require name and address information be given from the customer: PHP Code:
PHP Code:
|
|
#3
|
||||
|
||||
|
Rather than asking for those details, I think he just wants to pull them from the account. Since the details are not directly available to the module, you would need to do a direct query on the database from your module.
Maybe Tyson could post an example of this, if you think I'm on the right track. |
|
#4
|
|||
|
|||
|
In that case you can fetch fields for the user by calling auserinfo(). The fields returned are numerically-indexed, so you'll want to take a look at what indices contain the fields you need.
PHP Code:
|
|
#5
|
|||
|
|||
|
Hi
That is just the information I needed, I will have a go at expanding the Plesk module in a week or so when I have some spare time Thanks |
![]() |
| Bookmarks |
| Tags |
| module, plesk |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Plesk module (client creation) error | keeblerelfmatt | General Discussion | 2 | 06-24-2010 06:50 PM |
| Plesk module | jacobb | Pre-Sale Questions | 8 | 05-19-2010 07:44 PM |
| Plesk Module Handling | agerszt | Feature Requests | 2 | 07-04-2008 03:57 PM |
| Plesk Module | Cody | Modules & Gateways | 4 | 03-15-2008 04:39 AM |
| Plesk Module | Cody | Development Status | 0 | 10-17-2007 04:32 PM |