mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-27 08:53:12 +08:00
Merge branch 'master' into translations
This commit is contained in:
commit
fcbf31bd46
1 changed files with 11 additions and 10 deletions
|
@ -51,16 +51,17 @@ class ActivityService {
|
|||
public function add($subject,$subjectParams=array(),
|
||||
$message='',$messageParams=array(),
|
||||
$link='',$user=null,$type='') {
|
||||
$activity = $this->manager->generateEvent();
|
||||
$activity->setType($type);
|
||||
$activity->setApp('passman');
|
||||
$activity->setSubject($subject, $subjectParams);
|
||||
$activity->setLink($link);
|
||||
$activity->setAffectedUser($user);
|
||||
$activity->setAuthor($user);
|
||||
$activity->setTimestamp(time());
|
||||
$activity->setMessage($message, $messageParams);
|
||||
print_r($this->manager->publish($activity));
|
||||
if($user) {
|
||||
$activity = $this->manager->generateEvent();
|
||||
$activity->setType($type);
|
||||
$activity->setApp('passman');
|
||||
$activity->setSubject($subject, $subjectParams);
|
||||
$activity->setLink($link);
|
||||
$activity->setAffectedUser($user);
|
||||
$activity->setAuthor($user);
|
||||
$activity->setTimestamp(time());
|
||||
$activity->setMessage($message, $messageParams);
|
||||
}
|
||||
return array('success'=>'ok');
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue