Lines Matching +full:delete +full:- +full:user -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)

24      * This will automatically overwrite any existent subscription for the given user on this
27 * @throws Exception when user or style is empty
31 * @param string $user
37 public function add($id, $user, $style, $data = '')
39 if (!$this->isenabled()) {
43 // delete any existing subscription
44 $this->remove($id, $user);
46 $user = auth_nameencode(trim($user));
50 if (!$user) {
51 throw new Exception('no subscription user given');
60 $line = "$user $style $data\n";
61 $file = $this->file($id);
74 * @param string|array $user
81 public function remove($id, $user = null, $style = null, $data = null)
83 if (!$this->isenabled()) {
87 $file = $this->file($id);
93 $re = $regexBuilder->buildRegex($user, $style, $data);
101 * and user is in effect. Else it contains an array of arrays with the fields
105 * @param string $user User, defaults to $_SERVER['REMOTE_USER']
112 public function userSubscription($id = '', $user = '')
114 if (!$this->isenabled()) {
124 if (!$user) {
125 $user = $INPUT->server->str('REMOTE_USER');
128 if (empty($user)) {
133 $subs = $this->subscribers($id, $user);
142 'style' => $info[$user][0],
143 'data' => $info[$user][1],
157 * @param string|array $user
167 public function subscribers($page, $user = null, $style = null, $data = null)
169 if (!$this->isenabled()) {
174 $files = [':' => $this->file(':')];
176 $files[$page] = $this->file($page);
181 $re = $regexBuilder->buildRegex($user, $style, $data);
207 $u = rawurldecode($m[1]); // decode the user name
220 * Aggregates all email addresses of user who have subscribed the given page with 'every' style
223 * - $id (the page id),
224 * - $self (whether the author should be notified,
225 * - $addresslist (current email address list)
226 * - $replacements (array of additional string substitutions, @KEY@ to be replaced by value)
230 * @author Steven Danz <steven-danz@kc.rr.com>
237 if (!$this->isenabled()) {
251 $subscriptions = $this->subscribers($id, null, 'every');
255 foreach ($users as $user => $info) {
256 $userinfo = $auth->getUserData($user);
263 if (!$self && $user == $INPUT->server->str('REMOTE_USER')) {
267 $level = auth_aclcheck($id, $user, $userinfo['grps']);
269 if (strcasecmp($userinfo['mail'], $conf['notify']) != 0) { //skip user who get notified elsewhere
270 $result[$user] = $userinfo['mail'];