File tree Expand file tree Collapse file tree 2 files changed +3
-529
lines changed
tests/lib/Activity/NullSession Expand file tree Collapse file tree 2 files changed +3
-529
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class Manager implements IManager {
5959 * @param IConfig $config
6060 */
6161 public function __construct (IRequest $ request ,
62- IUserSession $ session = null ,
62+ IUserSession $ session ,
6363 IConfig $ config ) {
6464 $ this ->request = $ request ;
6565 $ this ->session = $ session ;
@@ -177,7 +177,7 @@ public function publish(IEvent $event) {
177177 }
178178
179179 if ($ event ->getAuthor () === null ) {
180- if ($ this ->session !== null && $ this -> session ->getUser () instanceof IUser) {
180+ if ($ this ->session ->getUser () instanceof IUser) {
181181 $ event ->setAuthor ($ this ->session ->getUser ()->getUID ());
182182 }
183183 }
@@ -501,7 +501,7 @@ public function setCurrentUserId($currentUserId) {
501501 public function getCurrentUserId () {
502502 if ($ this ->currentUserId !== null ) {
503503 return $ this ->currentUserId ;
504- } else if ($ this -> session === null || !$ this ->session ->isLoggedIn ()) {
504+ } else if (!$ this ->session ->isLoggedIn ()) {
505505 return $ this ->getUserFromToken ();
506506 } else {
507507 return $ this ->session ->getUser ()->getUID ();
You can’t perform that action at this time.
0 commit comments