File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
apps/files_external/lib/Migration Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 2828use OCP \IUserSession ;
2929
3030class DummyUserSession implements IUserSession {
31-
3231 private ?IUser $ user = null ;
3332
3433 public function login ($ uid , $ password ) {
Original file line number Diff line number Diff line change 3939use OC \User \LoginException ;
4040use OCP \EventDispatcher \IEventDispatcher ;
4141use OCP \ILogger ;
42+ use OCP \ISession ;
4243use OCP \IUserManager ;
43- use OCP \IUserSession ;
4444use OCP \Server ;
4545use OCP \User \Events \BeforeUserLoggedInEvent ;
4646use OCP \User \Events \UserLoggedInEvent ;
@@ -351,7 +351,7 @@ public static function isAdminUser($uid) {
351351 * @return string|false uid or false
352352 */
353353 public static function getUser () {
354- $ uid = Server::get (IUserSession ::class)-> getUser () ?->getUID( );
354+ $ uid = Server::get (ISession ::class)?->get( ' user_id ' );
355355 if (!is_null ($ uid ) && self ::$ incognitoMode === false ) {
356356 return $ uid ;
357357 } else {
You can’t perform that action at this time.
0 commit comments