1: <?php
2: /**
3: * Horde_Block_Account_Base defines an API for getting/displaying account
4: * information for a user for the accounts module.
5: *
6: * Copyright 2001-2012 Horde LLC (http://www.horde.org/)
7: *
8: * See the enclosed file COPYING for license information (LGPL). If you
9: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
10: *
11: * @author Eric Jon Rostetter <eric.rostetter@physics.utexas.edu>
12: * @author Jan Schneider <jan@horde.org>
13: * @package Horde
14: */
15: class Horde_Block_Account_Base
16: {
17: /**
18: * Hash containing connection parameters.
19: *
20: * @var array
21: */
22: protected $_params = array();
23:
24: /**
25: * Constructor.
26: *
27: * @param array $params Hash containing connection parameters.
28: */
29: public function __construct(array $params = array())
30: {
31: $this->_params = $params;
32: }
33:
34: /**
35: * Returns the username.
36: *
37: * @return string The lowercased username.
38: *
39: */
40: public function getUsername()
41: {
42: return Horde_String::lower($this->_params['user']);
43: }
44:
45: /**
46: * Returns the user's quota if available.
47: *
48: * @return array A quota array, elements are used bytes and limit bytes.
49: */
50: public function getQuota()
51: {
52: return array();
53: }
54:
55: /**
56: * Returns the user's full name.
57: *
58: * @return string The user's full name.
59: */
60: public function getFullname()
61: {
62: return '';
63: }
64:
65: /**
66: * Returns the user's home (login) directory.
67: *
68: * @return string The user's directory.
69: */
70: public function getHome()
71: {
72: return '';
73: }
74:
75: /**
76: * Returns the user's default shell.
77: *
78: * @return string The user's shell.
79: */
80: public function getShell()
81: {
82: return '';
83: }
84:
85: /**
86: * Returns the date of the user's last password change.
87: *
88: * @return string Date string.
89: */
90: public function getPasswordChange()
91: {
92: return '';
93: }
94:
95: /**
96: * Returns the status of the current password.
97: *
98: * @return string A string with a warning message if the password is about
99: * to expire.
100: */
101: public function checkPasswordStatus()
102: {
103: return '';
104: }
105: }
106: