我正在尝试在Symfony中学习 FOSUserBundle strong>。 我搜索谷歌“如何检查其他用户是否登录到他们的帐户”,但我没有这样做。 我希望在特定用户登录时添加绿色标记,就像Facebook一样。 p>
我不知道 FOSUserBundle strong>是否有代码 这将检查用户是否已登录。我发现了这一点(关于SOF的其他问题)但它只检查当前用户是否已登录。 p>
我不知道这是一个好主意 在我的实体中添加此属性 p>
这将设置用户的状态(登录与否),我将添加一列到 fos_user表将其保存到数据库中。 p>
div>
/ **
*
* @ORM \ Column(name =“log_status”,type =“boolean”,nullable = true)
* /
protected $ logStatus;
code> pre>
I'm trying to study FOSUserBundle in Symfony. I searched on google "how to check if other users are logged into their account", but I failed to do it. I want to add a green coloured mark if a specific user is logged in, the way Facebook does it.
I don't know if FOSUserBundle has a code that will check whether a user is logged in. I found this (other question on SOF) but it only checks if the current user is logged in.
I don't know it's a good idea to add this property in my entity
/**
*
* @ORM\Column(name="log_status", type="boolean", nullable=true)
*/
protected $logStatus;
This will set the status of a user (logged in or not) and I'll add a column to the fos_user table to save it to the database.